def yn(hantei, yes='Yes', no='No'): print(yes if hantei else no) def p(*args): print(*args) def c(a): try: aa=int(a) return str(aa+1) except: return a def solve(S): SS=S.split() print(*list(map(c,SS))) for i in range(int(input())): solve(input())