#Design a program for creating machine that accepts the string always ending with 101

s = input("Enter the string: ")
if len(s)<3:
    print("Rejected")
else:
    n = len(s)
    if s[n-3:]=="101":
        print("Accepted")
    else:
        print("Rejected")

2fed63bebd74e0e0369d585a956d9c92f6b4cd24
<mask token>

<mask token>
if len(s) < 3:
    print('Rejected')
else:
    n = len(s)
    if s[n - 3:] == '101':
        print('Accepted')
    else:
        print('Rejected')

s = input('Enter the string: ')
if len(s) < 3:
    print('Rejected')
else:
    n = len(s)
    if s[n - 3:] == '101':
        print('Accepted')
    else:
        print('Rejected')

#Design a program for creating machine that accepts the string always ending with 101

s = input("Enter the string: ")
if len(s)<3:
    print("Rejected")
else:
    n = len(s)
    if s[n-3:]=="101":
        print("Accepted")
    else:
        print("Rejected")
