Yura is tasked to build a closed fence in shape of an arbitrary non-degenerate simple quadrilateral. He's already got three straight fence segments with known lengths $a$, $b$, and $c$. Now he needs to find out some possible integer length $d$ of the fourth straight fence segment so that he can build the fence using these four segments. In other words, the fence should have a quadrilateral shape with side lengths equal to $a$, $b$, $c$, and $d$. Help Yura, find any possible length of the fourth side.

A non-degenerate simple quadrilateral is such a quadrilateral that no three of its corners lie on the same line, and it does not cross itself.


-----Input-----

The first line contains a single integer $t$ — the number of test cases ($1 \le t \le 1000$). The next $t$ lines describe the test cases.

Each line contains three integers $a$, $b$, and $c$ — the lengths of the three fence segments ($1 \le a, b, c \le 10^9$).


-----Output-----

For each test case print a single integer $d$ — the length of the fourth fence segment that is suitable for building the fence. If there are multiple answers, print any. We can show that an answer always exists.


-----Example-----
Input
2
1 2 3
12 34 56

Output
4
42



-----Note-----

We can build a quadrilateral with sides $1$, $2$, $3$, $4$.

We can build a quadrilateral with sides $12$, $34$, $56$, $42$.

Difficulty: interview

Starter code:

Solutions:
t = int(input())

for _ in range(t):
    a, b, c = map(int, input().split())
    print(a+b+c-1)

for _ in range(int(input())):
 a,b,c=map(int,input().split())
 print(a+b+c-1)

input=__import__('sys').stdin.readline
for _ in range(int(input())):
	a,b,c=map(int,input().split())
	print(a+b+c-1)

# by the authority of GOD     author: manhar singh sachdev #

import os,sys
from io import BytesIO, IOBase

def main():
    for _ in range(int(input())):
        a,b,c = map(int,input().split())
        print(max(a,b,c))

#Fast IO Region
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

def __starting_point():
    main()
__starting_point()

for __ in range(int(input())):
    a, b, c = list(map(int, input().split()))
    print(a + b + c - 1)

t=int(input())
for you in range(t):
    l=input().split()
    li=[int(i) for i in l]
    print(max(li)+1)


import sys
ii = lambda: sys.stdin.readline().strip()
idata = lambda: [int(x) for x in ii().split()]

def solve():
    a, b, c = idata()
    print(max(a, b, c))
    return

for t in range(int(ii())):
    solve()


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
    for _ in range(t):
        a,b,c = list(map(int,input().split()))
        yield a+b+c-1

def __starting_point():
    t= int(input())
    ans = gift()
    print(*ans,sep='\n')
            


#"{} {} {}".format(maxele,minele,minele)

__starting_point()

t = int(input())

for _ in range(t):
    a,b,c = list(map(int,input().split()))
    print(a+b+c-1)


n=int(input())
for i in range(n):
    d = [int(x) for x in input().split()]
    print(sum(d)-1)

for t in range(int(input())):
    a = list(map(int, input().split()))
    print(sum(a)-1)


import sys
input = sys.stdin.readline

def getInts():
    return [int(s) for s in input().split()]

def getInt():
    return int(input())

def getStrs():
    return [s for s in input().split()]

def getStr():
    return input().strip()

def listStr():
    return list(input().strip())

import collections as col
import math

"""
"""

def solve():
    A, B, C = getInts()
    return A+B+C-1

for _ in range(getInt()):
    print(solve())


# map(int, input().split())
rw = int(input())
for wewq in range(rw):
    a, b, c = list(map(int, input().split()))
    print(a + b + c - 1)




import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

# available on Google, not available on Codeforces
# import numpy as np
# import scipy


def solve(a,b,c):  # fix inputs here
    console("----- solving ------")

    # return a string (i.e. not a list or matrix)
    return max([a,b,c])


def console(*args):  # the judge will not read these print statement
    print('\033[36m', *args, '\033[0m', file=sys.stderr)
    return

# fast read all
# sys.stdin.readlines()

for case_num in range(int(input())):
    # read line as a string
    # strr = input()

    # read line as an integer
    # k = int(input())
    
    # read one line and parse each word as a string
    # lst = input().split()

    # read one line and parse each word as an integer
    a,b,c = list(map(int,input().split()))

    # read matrix and parse as integers (after reading read nrows)
    # lst = list(map(int,input().split()))
    # nrows = lst[0]  # index containing information, please change
    # grid = []
    # for _ in range(nrows):
    #     grid.append(list(map(int,input().split())))

    res = solve(a,b,c)  # please change
    
    # Google - case number required
    # print("Case #{}: {}".format(case_num+1, res))

    # Codeforces - no case number required
    print(res)


from collections import defaultdict
t = int(input())
for _ in range(t):
    a,b,c = [int(x) for x in input().split()]
    print(max(a,b,c)+1)


t = int(input())

for w in range(t):
    a, b, c = list(map(int, input().split()))

    print(max(a, b, c))


for _ in range(int(input())):
    a, b, c = list(map(int, input().split()))
    print(a+b+c-1)


def solve(a, b, c):
    return (a + b + c - 1)


t = int(input())
for i in range(t):
    a, b, c = list(map(int, input().split()))
    print(solve(a, b, c))


for _ in range(int(input())):
    a, b, c = map(int, input().split())
    d = a + b + c - 1
    print(d)

import sys
input = sys.stdin.readline
def print(val):
    sys.stdout.write(str(val) + '\n')
def prog():
    for _ in range(int(input())):
        a = list(map(int,input().split()))
        print(sum(a) - 1)
prog()


for i in [0]*int(input()):print(sum(map(int,input().split()))-1)

t=int(input())
for _ in range(t):
    a, b, c=list(map(int, input().split()))
    d=a+b+c-1
    print(d)


read = lambda: list(map(int, input().split()))
t = int(input())
for i in range(t):
	a, b, c = read()
	print(a + b + c - 1)


t = int(input())

for case in range(t):
    a, b, c = list(map(int, input().split()))
    arr = list(sorted([a, b, c]))
    minsm = a + b
    min_len = abs(c - minsm)
    print(min_len + 1)


t = int(input())
for _ in range(t):
    a, b, c = map(int, input().split())
    print(max(a,b,c))

t= int(input())
for _ in range(t):
    a,b,c = list(map(int, input().split()))
    p = a+b+c
    print(p-1)


T = int(input())
for t in range(T):
    xs = [int(x) for x in input().split()]
    g = sum(xs)
    print(g-1)

t = int(input())
for _ in range(t):
    l1 = [int(x) for x in input().split()]
    print(sum(l1)-1)

t=int(input())
while t:
    t-=1
    a,b,c=list(map(int,input().split()))
    print(max(a+b,b+c,c+a))


z,zz=input,lambda:list(map(int,z().split()))
zzz=lambda:[int(i) for i in stdin.readline().split()]
szz,graph,mod,szzz=lambda:sorted(zz()),{},10**9+7,lambda:sorted(zzz())
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac
def lcd(xnum1,xnum2):return (xnum1*xnum2//gcd(xnum1,xnum2))
def prime(x):
    p=ceil(x**.5)+1
    for i in range(2,p):
        if (x%i==0 and x!=2) or x==0:return 0
    return 1
def dfs(u,visit,graph):
    visit[u]=True
    for i in graph[u]:
        if not visit[i]:
            dfs(i,visit,graph)

###########################---Test-Case---#################################
"""



"""
###########################---START-CODING---##############################


num=1
num=int(z())

for _ in range( num ):
    a,b,c=szzz()
    print(c)