a = [] while True: try: a.append(input().split()) except EOFError: break for i in range(len(a)): if a[i] == 0: a.remove(a[i]) print(a)