def main(): N = int(input()) for i in range(N): z = input().split() def plus(x): try: return str(int(x)+1) except: return x print(' '.join(map(plus, z))) if __name__ == '__main__': main()