while True: numbers = map(str,raw_input().strip().split()) for num in numbers: if num[0]=="q" or num[0]=="Q": print num