int input for in range map str input split int int str if 30 or 30 app

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
n=int(input())
s=[]
for i in range(n):
m,l,a,b = map(str, input().split())
a=int(a)
b=int(b)
m=str(m+' '+l)
if a< 30 or b< 30:
s.append(m)
s.sort()
print(s)