while True:
    a = input("Welcome! How many people, please?\nEnter 'quit' to end the program.\n") 
    if a == 'quit':
        break
    if not a.isnumeric():
        continue
    elif int(a) not in range(1,21):
        continue
    elif int(a) <=4 :
        print('Your small table is reserved!')
    elif int(a) > 4 and int(a) <=6:
        print('Your middle table is reserved!')
    elif int(a) > 6 and int(a) <=10:
        print('Your large table is reserved!')
    else:
        print('Sorry, there is no free table that seats over ten persons.')