Harryxun/stf_run huggingface dataset:
import math

N = int(input())
A = sorted(map(int, input().split()))

for i in range(N - 1):
    A[i + 1] = math.gcd(A[i], A[i + 1])

print(A[N - 1])

### FIXED CODE ###

import fractions as f

N = int(input())
A = sorted(map(int, input().split()))

for i in range(N - 1):
    A[i + 1] = f.gcd(A[i], A[i + 1])

res = A[N - 1]
print(res)
s=input()
t=input()

count = []

for i in range(len(s)-len(t)):
    c=0
    for j in range(i,i+len(t)):
        if s[j] == t[j-i]:
            c+=1
    
    count.append(c)

print(len(t)-max(count))


### FIXED CODE ###

s=input()
t=input()

count = []

for i in range(len(s)-len(t)+1):
    c=0
    for j in range(i,i+len(t)):
        if s[j] == t[j-i]:
            c+=1
    count.append(c)

# print(count)
print(len(t)-max(count))
n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[]
  y=[]
  for j in range(a):
    x,y=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
c=0
for i in range(n):
  #l=[1]*n
  #for j in range(i, n-i):
    #if l[j]==0:continue
    #for k in range(A[j]):
      #b=X[j][k]
      #l[b] *= Y[j][k]
if c<l.count(1):
  c=l.count(1) 
  
        
  
print(c)  
   

### FIXED CODE ###

n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[0]*a
  y=[0]*a
  for j in range(a):
    x[j],y[j]=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
s=0
for i in range(2**n):
  c=0
  d=0
  B=[0]*n
  for j in range(n):
    if((i >> j) & 1):
      c=c+1
      B[j]=1
  for k in range(n):
    if B[k]==1:
      for j in range(A[k]):
        if Y[k][j]!=B[X[k][j]-1]:
          d=-1
          break
    if d<0:
      break
  if s<c and d==0:
    s=c
      
      
print(s)
MOD = 10 ** 5
n, m = map(int, input().split())
kyori = [int(input()) for _ in range(n - 1)]
a = [int(input()) for _ in range(m)]
rui = [0] * n
for i in range(n - 1):
    rui[i + 1] = rui[i] + kyori[i]

ans = 0
tmp = 0
for i in range(m):
    ans += abs(rui[tmp] - rui[tmp + a[i]])
    tmp += a[i]

print(ans % MOD)

### FIXED CODE ###

inData = input().split(' ')

ans = 0
count = 0
maxCount = int(inData[2])
many = int(inData[1])
nedan = int(inData[0])

for i in range(0, maxCount):
    if nedan <= many:
        if count < maxCount:
            ans += 1
            many -= nedan
        else:
            break
    else:
        break

print(ans)
a,b,c=(map(int,input()))
A =[]
B =[]
C =[]
for i in range(1,a+1):
  if a%i==0:
    A = i
for i in range(1,b+1):
  if b%i==0:
    B =i
for i in A:
  for j in B:
    if A[i]=B[j]:
      C = A[i]
print(C[c])

### FIXED CODE ###

a,b,c=(map(int,input().split()))
gcd = 0
d = min(a,b)
for i in range(d,0,-1):
  if a%i==0 and b%i==0:
    gcd +=1
    if gcd ==c:
      print(i)
n=int(input())
a=input()
ans=""
for i in range(n-1,-1,-2):
  ans+=a[i]
for i in range(n%a,n,2):
  ans+=a[i]
print(ans)

### FIXED CODE ###

n=int(input())
a=input().split()
ans=""
for i in range(n-1,-1,-2):
  ans+=a[i]+" "
for i in range(n%2,n,2):
  ans+=a[i]+" "
print(ans)
s = input()
t = list(s)
x = 0
y = 0
z = 0
r = []

if t[0] == "A":
  x = 1
  
r.append(t[1])
r.append(t[len(t) - 1])

for i in range(2,len(t) - 1): 
  if t[i] == "C":
    y += 1
  else:
    r.append(t[i])

for j in r:
  if j.isupper():
    z = 1

if x = 1 and y = 1 and z = 0:
  print("AC")
else:
  print("WA")


### FIXED CODE ###

s = input()
t = list(s)
x = 0
y = 0
z = 0
r = []

if t[0] == "A":
  x = 1
  
r.append(t[1])
r.append(t[len(t) - 1])

for i in range(2,len(t) - 1): 
  if t[i] == "C":
    y += 1
  else:
    r.append(t[i])

for j in r:
  if j.isupper():
    z = 1

if x == 1 and y == 1 and z == 0:
  print("AC")
else:
  print("WA")
A,B=map(int,input().split())
B=100*B
print(A*B//2)

### FIXED CODE ###

A,B=input().split()
A=int(A)
B=round(100*float(B))
print(A*B//100)
#coding:utf-8
import sys

BAMB_NUM = 0
BAMB_A = 0
BAMB_B = 0
BAMB_C = 0
BAMB_LIST = []

def calcMP(int idx, int lenA, int lenB, int lenC):
    # classified all bamboos
    if (idx == BAMB_NUM):
        # exists a zero length bamboo
        if (lenA <= 0 or lenB <= 0 or lenC <= 0):
            return sys.maxsize
        return abs(lenA - BAMB_A) + abs(lenB - BAMB_B) + abs(lenc - BAMB_C)
    
    # don't use idx-th bamboo
    mp = calcMP(idx+1, lenA, lenB, lenC)

    # use idx-th bamboo
    mp = min(mp, calcMP(lenA + BAMB_LIST[idx], lenB, lenC) + (BAMB_A > 0 ? 10 : 0))
    mp = min(mp, calcMP(lenA, lenB + BAMB_LIST[idx], lenC) + (BAMB_B > 0 ? 10 : 0))
    mp = min(mp, calcMP(lenA, lenB, lenC + BAMB_LIST[idx]) + (BAMB_C > 0 ? 10 : 0))

    return mp

if __name__ == "__main__":
    """
    http://drken1215.hatenablog.com/entry/2019/02/24/224100
    """
    # requested bamboo lengths
    bamb_num, bambA, bambB, bambC = map(lambda x: int(x), input().split())
    # available bamboo lengths
    bamb_list = []
    for bamb in range(bamb_num):
        bamb_list.append(int(input()))

    mp = calcMP(0, 0, 0, 0)
    print(mp)

### FIXED CODE ###

#coding:utf-8
import sys

BAMB_NUM = 0
BAMB_A = 0
BAMB_B = 0
BAMB_C = 0
BAMB_LIST = []

def calcMP(idx, lenA, lenB, lenC):
    """
    calculate MP.
    """
    # when classified all bamboos
    if (idx == BAMB_NUM):
        return abs(lenA - BAMB_A) + abs(lenB - BAMB_B) + abs(lenC - BAMB_C) - 30 if min(lenA, lenB, lenC) > 0 else sys.maxsize
    
    # don't use idx-th bamboo
    mp1 = calcMP(idx + 1, lenA, lenB, lenC)
    # use idx-th bamboo
    mp2 = calcMP(idx + 1, lenA + BAMB_LIST[idx], lenB, lenC) + 10
    mp3 = calcMP(idx + 1, lenA, lenB + BAMB_LIST[idx], lenC) + 10
    mp4 = calcMP(idx + 1, lenA, lenB, lenC + BAMB_LIST[idx]) + 10

    return min(mp1, mp2, mp3, mp4)

if __name__ == "__main__":
    """
    http://drken1215.hatenablog.com/entry/2019/02/24/224100
    """
    # requested bamboo lengths
    BAMB_NUM, BAMB_A, BAMB_B, BAMB_C = map(lambda x: int(x), input().split())
    # available bamboo lengths
    for bamb in range(BAMB_NUM):
        BAMB_LIST.append(int(input()))

    mp = calcMP(0, 0, 0, 0)
    print(mp)
from sys import stdin
import collections
N=int(stdin.readline().rstrip())
data=[(x) for x in stdin.readline().rstrip().split()]
ans=0
if len(set(data)) == 1:
    ans=len(set(data[1::2]))
else:
    evenc = collections.Counter(data[0::2])
    even_num = evenc.most_common()[0][1]
    alle_num=len(data[0::2])
    
    oddc = collections.Counter(data[1::2])
    odd_num = oddc.most_common()[0][1]
    allo_num=len(data[1::2])
    
    if evenc.most_common()[0][0] == oddc.most_common()[0][0]:
        ans=min((N-(evenc.most_common()[1][1]+odd_num)),(N-(oddc.most_common()[1][1]+eve_num)))
    
    else:
        ans=N-(even_num+odd_num)
            
    
print(ans)

### FIXED CODE ###

from sys import stdin
import collections
N=int(stdin.readline().rstrip())
data=[(x) for x in stdin.readline().rstrip().split()]
ans=0
if len(set(data)) == 1:
    ans=len((data[1::2]))
else:
    evenc = collections.Counter(data[0::2])
    even_num = evenc.most_common()[0][1]
    alle_num=len(data[0::2])
    
    oddc = collections.Counter(data[1::2])
    odd_num = oddc.most_common()[0][1]
    allo_num=len(data[1::2])
    
    if evenc.most_common()[0][0] == oddc.most_common()[0][0]:
        ans=min((N-(evenc.most_common()[1][1]+odd_num)),(N-(oddc.most_common()[1][1]+even_num)))
    
    else:
        ans=N-(even_num+odd_num)
            
    
print(ans)
N,M,Q = gets.split.map(&:to_i)
a = []
b = []
c = []
d = []
Q.times do |i|
  a[i], b[i], c[i], d[i] = gets.split.map(&:to_i)
  a[i] -= 1
  b[i] -= 1
end

def score(array,a,b,c,d)
  tmp = 0
  for ai,bi,ci,di in a.zip(b,c,d)
    tmp += di if array[bi] - array[ai] == ci
  end
  tmp
end

def dfs(array,a,b,c,d)
  if array.length == N
    return score(array,a,b,c,d)
  end
  result = 0
  array.length > 0 ? (prev_last = array[-1]) : (prev_last = 0)
  for v in prev_last..M
    array.push(v)
    result = [result, dfs(array,a,b,c,d)].max
    array.pop
  end
  result
end

puts dfs(Array.new,a,b,c,d)


### FIXED CODE ###

N, M, Q = map(int, input().split())
a = [0] * Q
b = [0] * Q
c = [0] * Q
d = [0] * Q
for i in range(Q):
    a[i], b[i], c[i], d[i] = map(int, input().split())
    a[i] -= 1
    b[i] -= 1

# スコア計算
def score(A):
    tmp = 0
    for ai, bi, ci, di in zip(a, b, c, d):
        if A[bi] - A[ai] == ci:
            tmp += di
    return tmp

# DFS
def dfs(A):
    if len(A) == N:
        return score(A) # 数列 A のスコアを返す
    res = 0
    prev_last = A[-1] if len(A) > 0 else 0
    for v in range(prev_last, M):
        A.append(v)
        res = max(res, dfs(A)) # 再帰呼出しながら、スコア最大値も更新
        A.pop()
    return res

# 求める
print(dfs([]))
n=input()
print(1/2 if n%2==0 else (n-1)/2n)

### FIXED CODE ###

n=int(input())
print(1/2 if n % 2 == 0 else (n+1)/(2*n))
A, B, C, X = (int(input()) for i in range(4))

cnt = 0
for a in range(A+1):
  for b in range(B+1):
  	for c in range(C+1):
    	if 500*a + 100*b + 50*c == X:
        	cnt += 1
print(cnt)

### FIXED CODE ###

A, B, C, X = (int(input()) for i in range(4))

cnt = 0
for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if 500*a + 100*b + 50*c == X:
        cnt += 1
print(cnt)
X,Y = map(input().split()) #input number of animals and legs

crane_legs = 2
turtle_legs = 4

answer = "No"

for i in range(X+1): #X+1 because it will only consider 0,1,2
    remaining=X-i #
    if crane_legs*i + turtle_legs*remaining == y:
        answer = "Yes"
#Loop to check combinations of animals is correct

print(answer)

### FIXED CODE ###

#getting input from user
#cranes and turtle already give the information
#condition yes or no 
X,Y= map(int,input().split())
cranes= 2 # assign 2 to cranes
turtles= 4 # assign 4 to turtle
ans="No"
for i in range(X+1): 
    b=X-i
    if cranes*i + turtles*b == Y:
        ans = "Yes"
print(ans)

# Time complixity O(X)
n=int(input())
a= list(map(int,input().split()))

#for i in a:
#i=0
b=[0]*n
r=0
#while i<=n:
for i in a:
    r=a[i]
    A=a.count(i+1)
    M=a.count(i)
    C=a.count(i-1)

    b=A+M+C

print(max(b))


### FIXED CODE ###

n=int(input())
a= list(map(int,input().split()))

#for i in a:
#i=0
b=[0]*(10**5+10)
r=0
#while i<=n:
for i in a:
    b[i]+=1
    b[i+1]+=1
    b[i+2]+=1

print(max(b))
n = int(input())
count = 0
li = []

for i in range(1, n):
  if n - i == i or i in li:
    continue
    
  else:
    count += 1
    li.append(i)
    li.appned(n - i)
    
print(count)
      

### FIXED CODE ###

n = int(input())
count = 0

if n % 2 != 0:
  n += 1
 
for i in range(1, n // 2):
  if n - i == i:
    continue
    
  else:
    count += 1
    
print(count)
N = int(input())

if N[-1]==3:
  print('bon')
elif N[-1] in [0, 1, 6, 8]:
  print('pon')
else:
  print('hon')

### FIXED CODE ###

N = str(input())

if int(N[-1])==3:
  print('bon')
elif int(N[-1]) in [0, 1, 6, 8]:
  print('pon')
else:
  print('hon')
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : map(int, stdin.readline().split())

def main():
  n = ni()
  a = list(na())
  res = []
  for i in range(1,n+1):
    res.append(a[i])
  print(*res)

main()

### FIXED CODE ###

import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : map(int, stdin.readline().split())

def main():
  n = ni()
  a = list(na())
  d = {}
  for i, a in enumerate(a):
    d[a] = i+1
  res = []
  for i in range(n):
    res.append(d[i+1])
  print(*res)

main()
list = int(map(int, input().split()))

print(sorted(list)


### FIXED CODE ###

list = input().split()
uplist = sorted(list)

print(" ".join(map(str,uplist)))
lst = []
n, m  = map(int, input().split())
for _ in range(m):
    i, h = input().split()
    lst.append([int(i), str(h)])

jdg_wa = [0] * n 
jdg_ac = [0] * n

for _ in lst:
    idx = _[0] - 1
    if _[1] == 'WA' and jdg_ac[idx] != 1:
        jdg_wa[idx] += 1
    elif _[1] == 'AC':
        jdg_ac[idx] = 1
        penalty += jdg_wa[idx]
        
print(sum(jdg_ac),penalty)

### FIXED CODE ###

lst = []
n, m  = map(int, input().split())
for _ in range(m):
    i, h = input().split()
    lst.append([int(i), str(h)])

jdg_wa = [0] * n 
jdg_ac = [0] * n

penalty = 0
for _ in lst:
    idx = _[0] - 1
    if  jdg_ac[idx] != 1:
        if _[1] == 'WA':
            jdg_wa[idx] += 1
        elif _[1] == 'AC':
            jdg_ac[idx] = 1
            penalty +=  jdg_wa[idx]
print(sum(jdg_ac), penalty)
l

### FIXED CODE ###

n=int(input())
k=int(input())

x=list(map(int,input().split()))
a=0
for i in range(n):
  a+=min(x[i]*2,(k-x[i])*2)
  
print(a)
N,x=list(map(int,input().split()))
A=list(map(int,input().split()))

cnt=0
pre=0

for i in range(N):
  dif=max(A[i]+pre-x,0)
  cnt+=dif
  arr[i]-=dif
  pre=arr[i]
  
print(cnt)

### FIXED CODE ###

N,x=list(map(int,input().split()))
A=list(map(int,input().split()))

cnt=0
pre=0

for i in range(N):
  dif=max(A[i]+pre-x,0)
  cnt+=dif
  A[i]-=dif
  pre=A[i]
  
print(cnt)
visited = [False for _ in range(N)]
que = [1]
visited[0] = True
sign = [-1 for _ in range(N)]

while True:
    next_que = []
    if not que:
        break
#     for q in que:
#         probable_room = path[q-1]
#         for p in probable_room:
    else:
        for q in que:
            probable_room = path[q-1]
            for p in probable_room:
#                 if p == q:
#                     continue
                if visited[p-1]:
                    continue
                else:
#                 print(1111)
                    visited[p-1] = True
                    sign[p-1] = q
                    next_que.append(p)
    que = next_que
if all(visited):
    print("Yes")
    for i in range(1,N):
        print(sign[i])
else:
    print("No")
    

### FIXED CODE ###

N, M =map(int, input().split())



path = [[] for _ in range(N)]
for _ in range(M):
    A, B = map(int, input().split())
    path[A-1].append(B) 
    path[B-1].append(A)
    
    

visited = [False for _ in range(N)]
que = [1]
visited[0] = True
sign = [-1 for _ in range(N)]

while True:
    next_que = []
    if not que:
        break
#     for q in que:
#         probable_room = path[q-1]
#         for p in probable_room:
    else:
        for q in que:
            probable_room = path[q-1]
            for p in probable_room:
#                 if p == q:
#                     continue
                if visited[p-1]:
                    continue
                else:
#                 print(1111)
                    visited[p-1] = True
                    sign[p-1] = q
                    next_que.append(p)
    que = next_que
if all(visited):
    print("Yes")
    for i in range(1,N):
        print(sign[i])
else:
    print("No")
a = list(map(int, input().split()))

if set(len(a)) == 2:
  print('Yes')

else:
  print('No')
  


### FIXED CODE ###

a = list(map(int, input().split()))

if len(set(a)) == 2:
  print('Yes')
else:
  print('No')
a,b,c =  list(map(int, input().split()))

for i in range(b):
	if i*a%b == c:
		print('YES')
		sys.exit()

print('NO')

### FIXED CODE ###

import sys
a,b,c =  list(map(int, input().split()))

for i in range(b):
	if (i+1)*a%b == c:
		print('YES')
		sys.exit()

print('NO')
# -*- coding: utf-8 -*-
import sys, copy, math, itertools
from copy import *
from collections import deque
import numpy as np
from heapq import *
from bisect import *
import scipy as sp
from scipy.optimize import linprog
from scipy import ceil, ifft
from scipy.fftpack import fft

A, B, C = list( map(int, input().split() ) )

if A==B: print(C)
if B==C: print(A)
if C==A: print(B)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import numpy as np
from numpy import *
from copy import *

A, B, C = list( map(int, input().split() ) )

if A==B: print(C)
if B==C: print(A)
if C==A: print(B)
import sys

class dictionary:
    def __init__(self):
        self.lst = [None] * 444444444445

    def insert(self, key):
        hash = self.toHash(key)
        self.lst[hash] = 1

    def find(self, key):
        hash = self.toHash(key)
        if self.lst[hash] is not None:
            return True
        else:
            return False

    def toHash(self, key):
        key = key.replace("A", "1")
        key = key.replace("C", "2")
        key = key.replace("G", "3")
        key = key.replace("T", "4")
        return int(key)

if __name__ == "__main__":
    dic = dictionary()
    lines = sys.stdin.readlines()
    del lines[0]
    for command in lines:
        key = command.split()[1]
        if command[0] == "i":
            dic.insert(key)
        else:
            if dic.find(key):
                print "yes"
            else:
                print "no"

### FIXED CODE ###

import sys

class HashTable:
    def __init__(self):
        self.table = [None] * 4
        self.flag = False

class Dictionary:
    def __init__(self):
        self.hashTable = HashTable()

    def insert(self, key):
        table = self.hashTable
        for c in key:
            hash = self.toHash(c)
            if table.table[hash] is None:
                table.table[hash] = HashTable()
            table = table.table[hash]
        table.flag = True

    def find(self, key):
        table = self.hashTable
        for c in key:
            hash = self.toHash(c)
            if table.table[hash] is None:
                return False
            table = table.table[hash]
        if table.flag:
            return True
        else:
            return False

    def toHash(self, key):
        if key == "A":
            return 0
        elif key == "C":
            return 1
        elif key == "G":
            return 2
        else:
            return 3

if __name__ == "__main__":
    dic = Dictionary()
    lines = sys.stdin.readlines()
    del lines[0]
    for command in lines:
        key = command.split()[1]
        if command[0] == "i":
            dic.insert(key)
        else:
            if dic.find(key):
                print "yes"
            else:
                print "no"
def  solve(n, total):
    cnt = 0

    if total == n:
        return 1
    else:
        if total > n:
            return 0
        else:
            cnt += solve(n, total+1)
            cnt += solve(n,total+2)

    return cnt



n,m = map(int, input().split())

steps = [True] * (n+1)
for i in range(m):
    steps[int(input())] = False

ans = 1

l = 0
r = 0
idx = 0
while l < len(steps):

    if idx >= len(steps):
        ans *= solve(r-l,0)
        break


    if steps[idx]:
        r = idx
    else:
        # idx段目が壊れてる
        #次も壊れてるなら終わり
        if steps[idx+1] == False:
            print(0)
            exit()
        else: 
            ans *= solve(r-l,0)
            l = idx+1
            r = idx+1
    idx += 1

print(ans%(10**9+7))

### FIXED CODE ###


import sys


n,m = map(int, input().split())
steps = [True] * (n+1)
for i in range(m):
    steps[int(input())] = False



dp = [0] * (n+1)
dp[0] = 1
dp[1] = 1
if n >= 2:
    dp[2] = 2

## 散弾未満の時
if n == 1:
    if not steps[1]:
        print(0)
    else:
        print(1)
    exit()
elif n == 2:
    if not steps[2]:
        print(0)
        exit()
    else:
        if not steps[1]:
            print(1)
        else:
            print(2)
        exit()


ans = 1

l = 0
r = 0
idx = 0
finished = 2
while l < len(steps):

    if idx >= len(steps):
        if r-l > finished:
            for i in range(finished+1, r-l+1):
                dp[i] = dp[i-2] + dp[i-1]
                finished = i
        ans *= dp[r-l]
        break

    if steps[idx]:
        r = idx
    else:
        # idx段目が壊れてる
        #次も壊れてるなら終わり
        if steps[idx+1] == False:
            print(0)
            exit()
        else: 
            if r-l > finished:
                for i in range(finished+1, r-l+1):
                    dp[i] = dp[i-2] + dp[i-1]
                    finished = i
            ans *= dp[r-l]
            l = idx+1
            r = idx+1
    idx += 1

print(ans%(10**9+7))
if S == AAA or BBB:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

S = input()
 
if (S == 'AAA') or (S == 'BBB'):
    print('No')
else:
    print('Yes')
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
s=a+b+c+d+e
li=[a,b,c,d,e]
for i in range(5) :
   li[i]=10-(li[i]%10)
while max(li)==10 :
   li.remove(max(li))
li.remove(max(li))
print(s+sum(li))

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
s=a+b+c+d+e
li=[a,b,c,d,e]
for i in range(5) :
   li[i]=10-(li[i]%10)
while 10 in li :
   li.remove(max(li))
if len(li)>0 :
   li.remove(max(li))
print(s+sum(li))
N, K = map(int, input().split())
pn = list(map(int, input().split()))

l = pn[:K]
for i in range(N-K+1):
    l = max(l, l+pn[K+1+i]-pn[i])
ans = (l+K)/2
print(ans)


### FIXED CODE ###

N, K = map(int, input().split())
pn = list(map(int, input().split()))

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)
N,T = map(int,input().split())
for i in range(N):
  dic  = {int(input()):int(input())}
a = sorted(dic.get())
for i in range(N):
  if dic[a[i]] <= T:
    print(a[i])
  else:
    continue

### FIXED CODE ###

N,T = map(int,input().split())

ct = [list(map(int,input().split())) for i in range(N)]

c = []
t = []

for i in range(N):
    c.append(ct[i][0])
    t.append(ct[i][1])

minc = 10000

for i in range(len(c)):
    if t[i] <= T and c[i] < minc:
        minc = c[i]

if minc == 10000:
    print("TLE")
else:
    print(minc)
ID_num, gate_num = tuple([int(i) for i in input().split(" ")])
min_list = []
max_list = []
for i in range(gate_num):
  	min_ID, max_ID = tuple([int(i) for i in input().split(" ")])
    min_list.append(min_ID)
    max_list.append(max_ID)
print(min(max_list) - max(min_list) + 1)

### FIXED CODE ###

ID_num, gate_num = tuple([int(i) for i in input().split(" ")])
min_list = []
max_list = []
for i in range(gate_num):
    min_ID, max_ID = tuple([int(i) for i in input().split(" ")])
    min_list.append(min_ID)
    max_list.append(max_ID)
M = min(max_list)
m = max(min_list)
if M >= m:
    print(min(max_list) - max(min_list) + 1)
else:
    print(0)
import sys
from math import gcd
input = sys.stdin.readline
N, M = map(int, input().split())
S = list(input())[: -1]
T = list(input())[: -1]
ln = N * M // gcd(N, M)
res = ["a"] * ln
x = 0
y = 0
for i in range(ln):
  if i == x * ln // N and (i == y * ln // M):
    if S[x] != T[y]:
      print(-1)
      exit(0)
    res[i] = S[x]
    x += 1
    y += 1
  elif i == x * ln // N:
    res[i] = S[x]
    x += 1
  elif i == y * ln // M:
    res[i] = T[y]
    y += 1
print(len(res))

### FIXED CODE ###

import sys
from math import gcd
input = sys.stdin.readline
N, M = map(int, input().split())
S = list(input())[: -1]
T = list(input())[: -1]
g = gcd(N, M)
ln = N * M // g
x = 0
y = 0
while x < N and (y < M):
  if S[x] != T[y]:
    print(-1)
    exit(0)
  x += ln // M
  y += ln // N
print(ln)
t=input()
s=[0]*len(t)
for i in range(len(t)):
  
  if t[i]=='?':
    if i==0:
      if t[i+1]=='D':s[i]='P'
      else:s[i]='D'
      continue
      
    if i==len(t)-1:
        s[i]='D'
        continue
    
    if s[i-1]=='P':s[i]='D'
    elif t[i+1]=='P':s[i]='D'
    else:s[i]='P'
  else:s[i]=t[i]
#print(s)
print(''.join(s))

### FIXED CODE ###

t=input()
s=[0]*len(t)

for i in range(len(t)):
  
    if t[i]=='?':
        if i==0:
            if len(t)>=2:
                if t[i+1]=='D':
                    s[i]='P'
                else:
                    s[i]='D'
            else:s[i]='D'
      
      
        elif i==len(t)-1:
            s[i]='D'
        
    
        else:
            if s[i-1]=='P':s[i]='D'
            elif t[i+1]=='P':s[i]='D'
            else:s[i]='P'

    elif t[i]=='D' or t[i]=='P':s[i]=t[i]
    else:continue
#print(s)
print(''.join(s))
N = int(input())
K = int(input())

print(N-(K-1))

### FIXED CODE ###

Array = [int(x) for x in input().split()]
N = Array[0]
K = Array[1]

print(N-(K-1))
N, K = map(int, input().split())
A = [0] * N

for i in range(K):
    d = int(input())
    targets = list(map(int, input().split()))
    for j in range(d):
        index = targets[j-1]
        A[index] = 1

count = 0
for i in range(N):
    if A[i] == 0:
        count += 1

print(count)


### FIXED CODE ###

N, K = map(int, input().split())
A = [0] * N

for i in range(K):
    d = int(input())
    targets = list(map(int, input().split()))
    for j in range(d):
        index = targets[j] -1
        A[index] = 1

count = 0
for i in range(N):
    if A[i] == 0:
        count += 1

print(count)