Harryxun/stf_run huggingface dataset:
n,m,k = map(int,input().split())
import sys
rks = [None] *n
sys.setrecursionlimit(10**9)
fgraph = [list() for i in range(n)]
bgraph = [list() for i in range(n)]
cgraph = [list() for i in range(n)]
for i in range(m):
        a,b = map(int, input().split())
        fgraph[a-1].append(b)
        fgraph[b-1].append(a)
def dfs(graph,s,r):
    if rks[s] is None:
        rks[s] = r
    for i in range(len(graph[s])):
        if rks[graph[s][i]-1] is not None:
            continue
        dfs(graph, graph[s][i]-1,r)
c = -1
for i in range(n):
    if rks[i] is None:
        c += 1
        dfs(fgraph, i, c)
for i in range(k):
        c,d = map(int, input().split())
        if rks[c-1] == rks[d-1]:
            bgraph[d-1].append(c)
            bgraph[c-1].append(d)
s = []
for i in range(c+1):
    s.append(rks.count(i))
for i in range(n):
        print(s[rks[i]] - len(fgraph[i]) - len(bgraph[i]) - 1)

### FIXED CODE ###

n,m,k = map(int,input().split())
import sys
rks = [None] *n
sys.setrecursionlimit(10**9)
fgraph = [list() for i in range(n)]
bgraph = [list() for i in range(n)]
cgraph = [list() for i in range(n)]
g = [[]for i in range(n)]
for i in range(m):
        a,b = map(int, input().split())
        fgraph[a-1].append(b)
        fgraph[b-1].append(a)
def dfs(graph,s,r):
    if rks[s] is None:
        rks[s] = r
    for i in range(len(graph[s])):
        if rks[graph[s][i]-1] is not None:
            continue
        g[r].append(0)
        dfs(graph, graph[s][i]-1,r)
c = -1
for i in range(n):
    if rks[i] is None:
        c += 1
        dfs(fgraph, i, c)
for i in range(k):
        c,d = map(int, input().split())
        if rks[c-1] == rks[d-1]:
            bgraph[d-1].append(c)
            bgraph[c-1].append(d)
for i in range(n):
        print(len(g[rks[i]]) - len(fgraph[i]) - len(bgraph[i]) )
ma = 0
mi = 123
for i in range(5):
  x = input()
  if ma < x:
    ma = x
  elif mi > x:
    mi = x
if ma - mi > input():
  print("Yay!")
else:
  print(":(")

### FIXED CODE ###

a = int(input())
ma = a
mi = a
for i in range(4):
  x = int(input())
  if ma < x:
    ma = x
  elif mi > x:
    mi = x
if ma - mi <= int(input()):
  print("Yay!")
else:
  print(":(")
N = int(input())
A = list(map(int, input().split()))

t = [0] * N + [0] * 10 ** 6
ans = 0
for i in range(N):
    sa = i - A[i]
    ans += t[sa]
    wa = i + A[i]
    t[wa] += 1

print(ans)


### FIXED CODE ###

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

t = [0] * (N + 1)
ans = 0
for i in range(N):
    sa = i - A[i]
    if sa >= 0:
        ans += t[sa]
    wa = i + A[i]
    if wa < N:
        t[wa] += 1

print(ans)
def main():
	num = raw_input()
	val = raw_input()

	if int(num) < 10:
		rate = int(val) + 100*(10 - int(num))
	else:
  		rate = int(val)
	print rate
if __name__ == "__main__":
	main()

### FIXED CODE ###

def main():
	num,val = input().split(" ")
	num = int(num)
	val = int(val)

	if num < 10:
		print(val + 100*(10-num))
	else:
		print(val)

if __name__ == "__main__":
    main()
N,M = int(input())
A = []
B = []
for i in range(N):
    A.append(input())
for i in range(M):
    B.append(input())
for i in range(N-M+1):
    for k in range(N-M+1):
        p = 1
        for j in range(i,i+M):
            a = A[j][k:k+M]
            b = B[j-i][k+M]
            if a != b:
                p = 0
        ans += 1
print(ans)

### FIXED CODE ###

N,M = map(int,input().split())
A = []
B = []
for i in range(N):
    A.append(input())
for i in range(M):
    B.append(input())
flag = 0
for i in range(N-M+1):
    for k in range(N-M+1):
        p = 1
        for j in range(i,i+M):
            a = A[j][k:k+M]
            b = B[j-i]
            if a != b:
                p = 0
                break
        if p == 1:
            flag = 1
        

if flag == 1:
    print('Yes')
else:
    print('No')
x = input()
HP = 0
while x > 500:
  x -= 500
  HP += 1000
while x > 5:
  x -= 5
  HP += 5
if x < 5:
  print(0)
print(HP)

### FIXED CODE ###

x = int(input())
HP = 0
FUCK = False

if x < 5:
  print(0)
  FUCK = True

while x >= 500:
  x -= 500
  HP += 1000

while x >= 5:
  x -= 5
  HP += 5

if not FUCK:
    print(HP)
h, w, n = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

d = dict()
for i in range(len(ab)):
    a = ab[i][0] - 1
    b = ab[i][0] - 1
    d[a] = set()

dp = [0] * 10
dp[0] = (h - 2) * (w - 2)
for i in range(n):
    a = ab[i][0] - 1
    b = ab[i][1] - 1
    for dx in [-1, 0, 1]:
        for dy in [-1, 0, 1]:
            nx, ny = a + dx, b + dy # center
            if nx >= 1 and nx <= h - 2 and ny >= 1 and ny <= w - 2:
                # print(nx, ny)
                tmp = 0
                for dx2 in [-1, 0, 1]:
                    for dy2 in [-1, 0, 1]:
                        if ny + dy2 in d[nx + dx2]:
                            tmp += 1

                dp[tmp] -= 1
                dp[tmp + 1] += 1

    d[a].add(b)

for x in dp:
    print(x)


### FIXED CODE ###

h, w, n = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

d = dict()
for i in range(len(ab)):
    a = ab[i][0] - 1
    b = ab[i][0] - 1
    d[a] = set()

dp = [0] * 10
dp[0] = (h - 2) * (w - 2)
for i in range(n):
    a = ab[i][0] - 1
    b = ab[i][1] - 1
    for dx in [-1, 0, 1]:
        for dy in [-1, 0, 1]:
            nx, ny = a + dx, b + dy # center
            if nx >= 1 and nx <= h - 2 and ny >= 1 and ny <= w - 2:
                # print(nx, ny)
                tmp = 0
                for dx2 in [-1, 0, 1]:
                    for dy2 in [-1, 0, 1]:
                        if nx + dx2 in d and ny + dy2 in d[nx + dx2]:
                            tmp += 1

                dp[tmp] -= 1
                dp[tmp + 1] += 1

    d[a].add(b)

for x in dp:
    print(x)
import sys
sys.setrecursionlimit(10 ** 6)

n = int(input())
x = input()
z = '1' * n
o = '0' * n
X = int(x, 2)

if (z == x):
  u = n - 1
  d = n - 1
elif (o == x):
  u = 1
  d = 1
else:
  tmp = len(list(filter(lambda x: x == '1', x)))
  u = tmp + 1
  d = tmp - 1


def popcount(i):
  return i % len(list(filter(lambda x: x == '1', format(i, 'b'))))


def solve(i, count):
  if (i <= 2 * 10**5 and ans[i] != 0):
    return count + ans[i]
  elif (i == 0):
    return count
  else:
    return solve(popcount(i), count + 1)


def solve2(i, div):
  if (i <= 2 * 10**5):
    return ans[i]
  else:
    return ans[i % div] + 1


ans = [0] * (2 * 10 ** 5 + 1)
_u = (2 * 10 ** 5) // u
U = X % u + (u * _u) + u
_d = (2 * 10 ** 5) // d
D = X % d + (d * _d) * d
Us = [0] * (2 * 10 ** 5)
Ds = [0] * (2 * 10 ** 5)
for i in range(1, 2 * 10 ** 5 + 1):
  ans[i] = solve(i, 0)
  
Us[0] = 1 % u
Ds[0] = 1 % d
for i in range(1, 2 * 10 ** 5):
  Us[i] = (Us[i-1] * 2) % u
  Ds[i] = (Ds[i-1] * 2) % d

for i in range(n):
  if(X <= 2 * 10 ** 5 + 1):
    if(x[i] == '0'):
      print(solve2(X + 2 ** (n - i - 1), u))
    else:
      print(solve2(X - 2 ** (n - i - 1), d))
  else:
    if(x[i] == '0'):
      print(solve2(U + Us[n-i-1], u))
    else:
      print(solve2(D - Ds[n-i-1], d))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)

n = int(input())
x = input()
z = '1' * n
o = '0' * n
X = int(x, 2)

if (n == 1 and x == '1'):
  print(0)
  exit()

if (z == x):
  u = n - 1
  d = n - 1
elif (o == x):
  u = 1
  d = 1
else:
  tmp = len(list(filter(lambda x: x == '1', x)))
  u = tmp + 1
  d = tmp - 1


def popcount(i):
  return i % len(list(filter(lambda x: x == '1', format(i, 'b'))))


def solve(i, count):
  if (i <= 2 * 10**5 and ans[i] != 0):
    return count + ans[i]
  elif (i == 0):
    return count
  else:
    return solve(popcount(i), count + 1)


def solve2(i, div):
  if (i <= 2 * 10**5):
    return ans[i]
  else:
    return ans[i % div] + 1


ans = [0] * (2 * 10 ** 5 + 4)
_u = (2 * 10 ** 5) // u
U = X % u + (u * _u) + u
if(d != 0):
  _d = (2 * 10 ** 5) // d
  D = X % d + (d * _d) * 2 + d * 2
Us = [0] * (2 * 10 ** 5)
Ds = [0] * (2 * 10 ** 5)
for i in range(1, 2 * 10 ** 5 + 4):
  ans[i] = solve(i, 0)
Us[0] = 1 % u
if(d != 0):
  Ds[0] = 1 % d
for i in range(1, 2 * 10 ** 5):
  Us[i] = (Us[i - 1] * 2) % u
  if(d != 0):
    Ds[i] = (Ds[i-1] * 2) % d

for i in range(n):
  if(x[i] == '0'):
    print(solve2(U + Us[n-i-1], u))
  else:
    if (d == 0):
      print(0)
    else:
      print(solve2(D - Ds[n-i-1], d))
def q38(n, d):
    max_d = max(d)
    min_d = min(d)
    count = 0
    for i in range(min_d+1, max_d):
        a = []
        b = []
        for j in d:
            if j >= i:
                a.append(j)
            else:
                b.append(j)
        if len(a) == len(b):
            count += 1
    return count
N = int(input())
d = [int(i) for i in input.split()]
print(q38(N, d))

### FIXED CODE ###

def check(N, d):
    numList = d
    numList.sort()
    
    if N % 2 != 0:
        print(0)
    else:
        print(numList[int(len(numList)/2)] - numList[int(len(numList)/2-1)])

N = int(input())
d = [int(i) for i in input().split()]
check(N, d)
a, b, k = map(int, input().split())
l = []
for i in range(1, min(a, b)):
    if a%i == 0 and b%i == 0:
        l.append(i)
print(l[-k])

### FIXED CODE ###

a, b, k = map(int, input().split())
l = []
for i in range(1, min(a, b)+1):
    if a%i == 0 and b%i == 0:
        l.append(i)
print(l[-k])
n = int(input())
cnt = [0,0,0,0,0]
comp = 'MARCH'
ans = 0

for i in range(N):
    word = input()
    for j in range(len(comp)):
        if word[0] == comp[j]:
            cnt[j] += 1

for i in range(len(cnt)):
    for j in range(i+1,len(cnt)):
        for k in range(j+1,len(cnt)):
            ans += cnt[i] * cnt[j] * cnt[k]
print(ans)

### FIXED CODE ###

N = int(input())
m = 0
a = 0
r = 0
c = 0
h = 0

for i in range(N):
    S = input()
    if S[0] == 'M':
        m += 1
    elif S[0] == 'A':
        a += 1
    elif S[0] == 'R':
        r += 1
    elif S[0] == 'C':
        c += 1
    elif S[0] == 'H':
        h += 1

ans = m * a * (r+c+h) + m * r * (c+h) + m * c * h + a * r * (c + h) + a * c * h + r * c * h
print(ans)
N,M = map(int,input().split())
ABC = [tuple(map(int,input().split())) for i in range(M)]

INF = float('inf')
dist = [INF] * N
dist[0] = 0
for i in range(N):
    for a,b,c in ABC:
        a,b,c = a-1,b-1,-c
        if dist[b] > dist[a] + c:
            dist[b] = dist[a] + c
            if i==N-1 and to == N-1:
                print('inf')
                exit()
print(-dist[-1])

### FIXED CODE ###

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

INF = float('inf')
def solve():
    d = [INF for i in range(N)]
    d[0] = 0
    for i in range(N):
        for fr,to,cost in es:
            if d[fr] == INF: continue
            if d[to] > d[fr] + cost:
                d[to] = d[fr] + cost
                if i == N-1 and to == N-1: return 'inf'
    return -d[N-1]

print(solve())
inf = float("INF")
from operator import itemgetter
a,b=map(int,input().split())
d = [0]*(2*(10**5)+10)
dp = []
for i in range(a):
    ts,tf,c =map(int,input().split())
    dp.append([ts,tf,c])

dp = sorted(dp, key=itemgetter(2))
for i in range(1,a):
    if dp[i][0] == dp[i-1][1] and dp[i][2] == dp[i-1][2]:
        dp[i][0] = dp[i-1][0]
        dp[i-1][0],dp[i-1][1],dp[i-1][2]=inf,inf,inf
        
M = 0
for ts,tf,ll in dp:
    d[(ts-1)*2]+=1
    d[(tf-1)*2+3]-=1
M = 0

for i in range(len(d)):
    if i > 0:
        d[i] = d[i-1]+d[i]
    if i%2!=0 :M = max(M,d[i])
print(M)

### FIXED CODE ###

##########################
from collections import defaultdict as ddict
N, C = map(int, input().split())
imos = [0] * (10**5 + 2)
last_s_by_c = ddict(lambda: 1)
last_t_by_c = ddict(int)
stc = [list(map(int, input().split())) for i in range(N)]
for s, t, c in sorted(stc, key=lambda x: x[1]):
	if last_t_by_c[c] != s:
		imos[last_s_by_c[c] - 1] += 1
		imos[last_t_by_c[c]] -= 1
		last_s_by_c[c] = s
	last_t_by_c[c] = t
for c in last_s_by_c:
	imos[last_s_by_c[c] - 1] += 1
	imos[last_t_by_c[c]] -= 1
for i in range(10**5 + 1):
	imos[i + 1] += imos[i]
print(max(imos))
#Coding: utf-8
2.N=int(input())
3.a=[]
4.for i in 5:
5.  a.append(int(input()))
6.import math
7.print(math.ceil(N/min(a))-4)


### FIXED CODE ###

#Coding: utf-8
N=int(input())
a=[]
for i in range(5):
  a.append(int(input()))
import math
print(math.ceil(N/min(a))+4)
import sys

def main():
    n = int(input())
    a = [int(x) for x in input().split()]

    diff_idx = -1
    min_idx = -1
    _min = 10*6
    for i in range(len(a)-1):
        if a[i] * a[i+1] <= 0 and (a[i] != 0 or a[i+1] != 0):
            diff_idx = i
            break
        tmp_min = abs(a[i]) + abs(a[i+1])
        if tmp_min < _min:
            _min = tmp_min
            min_idx = i

    start_idx = diff_idx if diff_idx != -1 else tmp_min
    ops = []

    a2 = a[start_idx:]
    a2.extend(a[:start_idx])

    b,s = (a[0],a[1]) if a[0] > a[1] else (a[1],a[0])

    if a2[2] < 0:
        curr = b - s
        ops.append((b,s))
    else:
        curr = s - b
        ops.append((s,b))

    for i in range(2,len(a2)-1):
        b = curr
        s = a[i]

        if curr < a[i]:
            b,s = s,b

        if a2[i+1] < 0:
            curr = b - s
            ops.append((b,s))
        else:
            curr = s - b
            ops.append((s,b))

    if a2[-1] < 0:
        curr = curr - a2[-1]
        ops.append((curr, a2[-1]))
    else:
        curr = a2[-1] - curr
        ops.append((a2[-1], curr))

    print(curr)
    for x,y in ops:
        print(x,y)

if __name__=='__main__':
    main()

### FIXED CODE ###

import sys

def bigsmall(x,y):
    return (x,y) if x>y else (y,x)

def main():
    n = int(input())
    a = list(map(int, input().split()))
    a.sort()

    if len(a) == 2:
        b,s = bigsmall(a[0],a[1])
        print(b-s)
        print(b,s)
        sys.exit()

    ops = []
    curr = 0
    b,s = bigsmall(a[0],a[-1])
    if a[1] <= 0:
        ops.append((b,s))
        curr = b - s
    else:
        ops.append((s,b))
        curr = s - b

    del a[-1]
    a.append(-1) # to set answer > 0

    for i in range(1, len(a)-1):
        b,s = bigsmall(curr,a[i])

        if a[i+1] <= 0:
            ops.append((b,s))
            curr = b - s
        else:
            ops.append((s,b))
            curr = s - b

    print(curr)
    for x,y in ops:
        print(x,y)

if __name__=='__main__':
    main()
import numpy as np
n = int(input())
a = list(map(int,input().split()))
w = np.zeros(9,dtype=int)
count = 0
for i in a:
    if i < 3200 and w[i//400]==0:
        count+=1
    w[i//400]+=1
if count == 0:
    print(1,w[8])
elif w[8] == 0:
    print(count,count)
else:
    print(count,count+w[8])

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
w = [0 for i in range(8)]
count = 0
sup = 0
for i in a:
    if i < 3200 and w[i//400]==0:
        count+=1
        w[i//400] += 1
    elif i >= 3200:
        sup += 1
if count == 0:
    print(1,sup)
elif sup == 0:
    print(count,count)
else:
    b= count+sup
    print(count,b)
x,y,z = input.split()
if x = y:
  if y = z:
    print('No')
  else print('Yes')
if y = z:
  if x = z:
    print('No')
  else print('Yes')
if x = z:
  if x = y:
    print('No')
  else print('Yes')

### FIXED CODE ###

x, y, z = input().split()
a = "No"
if x != y:
    if x == z:
        a = "Yes"
    elif y == z:
        a = "Yes"
    else:
        a = "No"
if x == y:
    if x == z:
        a = "No"
    elif y == z:
        a = "No"
    else:
        a = "Yes"
print(a)
import math
S = input()
s = list(S) #文字を一文字ずつリスト格納
count=0
N=math.ceil(len(s)/2)

for i in N:
 if not s[i]==s[N-i-1]:
  count+=1

print(count)

### FIXED CODE ###


import math
S = input()
s = list(S) #文字を一文字ずつリスト格納
count=0
N=int(math.ceil(len(s)/2))

for i in range(N):
 if not s[i]==s[len(s)-i-1]:
  count+=1

print(count)
n, k = map(int,input().split())
dcic = {}
aa = ()
for i in range(n):
    a,b = map(int,input().split())
    aa.add(a)
    if a in dcic:
        dcic[a] = dcic + b
    else:
        dcic.update({a:b})

bb = list(sorted(list(aa)))
cc = 0
for i in range(len(bb)):
    if k - dcic[bb[i]] > -1:
        k = k - dcic[bb[i]]
    else:
        cc = dcic[bb[i]]
        
print(cc)

    

### FIXED CODE ###

n, k = map(int,input().split())
dcic = {}
aa = set([])
for i in range(n):
    a,b = map(int,input().split())
    aa.add(a)
    if a in dcic:
        dcic[a] = dcic[a] + b
    else:
        dcic.update({a:b})
        
bb = list(sorted(list(aa)))
cc = 0
s = 0
for i in range(len(bb)):
    if s < k:
        s = s + dcic[bb[i]]
        cc = bb[i]
    else:
        ccc = bb[i]
print(cc)
s = input()
s = int(s)
h = s//3600
s = s - 3600*h
m = s//60
s = s - 60*m
print(h,':',m,':',s)


### FIXED CODE ###

s = input()
s = int(s)
h = s//3600
s = s - 3600*h
m = s//60
s = s - 60*m
print(h, ':', m, ':', s, sep='')
import numpy as np
N = int(input())
K = int(input())
win = [0]
win = np.array(win,dtype=np.float64)
for i in range(1,N+1):
  for j in range(N):
    if  i**j >= K:
      win[i] = (1/N)*(1/2)**j
      i += 1
    else:
      j += 1
ans = sum(win)
print(ans)

### FIXED CODE ###

N,K = map(int,input().split())
ans = 0
for i in range(1,N+1):
  j = 0
  point = i
  while point < K:
    point *= 2
    j += 1
  ans += (1/N)*(0.5**j)
print(ans)
array = input().split().sort()

for i in range(0..2):
    print(array[i], end="")


### FIXED CODE ###

#
# 2c
#

def main():
    l = list(map(int, input().split()))
    l.sort()
    print(*l)


if __name__ == '__main__':
    main()
import numpy as np
import math


s = input().split()
a=int(s[0])
b = int(s[1])

print(int(a*b/math.gcd(a,b)))

### FIXED CODE ###

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
s = input().split()
a = int(s[0])
b = int(s[1])
re = int(a*b/gcd(a, b))
print(re)
#input
N, K = map(int, input().split())
A = np.array(list(map(int, input().split())))

#output
import numpy as np
import math
A = np.sort(A)

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

q = np.full(N, 0)
for i in range(N-K+1):
    q[i] = cmb(N-i-1, N-K-i)

r = -q + q[-1::-1]

print((A*r).sum() % (10**9 + 7))

### FIXED CODE ###

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

#output
import math

A.sort()
mod = 10**9+7

n_ = 10**5 + 3
fun = [1]*(n_+1)
for i in range(1,n_+1):
    fun[i] = fun[i-1]*i%mod
rev = [1]*(n_+1)
rev[n_] = pow(fun[n_],mod-2,mod)
for i in range(n_-1,0,-1):
    rev[i] = rev[i+1]*(i+1)%mod
def cmb(n,r):
    if n <= 0 or r < 0 or r > n: return 0
    return fun[n]*rev[r]%mod*rev[n-r]%mod
#これだとTLE!
"""
def cmb(n, r):
    if n < r: return 0
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result
"""

M = 0
m = 0
for i, a in enumerate(A):
    M += cmb(i, K-1) * a
    m += cmb(N-i-1, K-1) * a
    M %= mod
    m %= mod

print((M-m) % mod)
import math
n = int(input())
d = {}
for i in range(1,int(math.sqrt(n))):
  if (n/i).is_integer():
    d.setdefault(i,n//i)
ans = []
for k,v in d.items():
  ans.append((k-1)+(v-1))
print(min(ans))

### FIXED CODE ###

import math
n = int(input())
d = {}
for i in range(1,(int(math.sqrt(n)))+1):
  if (n/i).is_integer():
    d.setdefault(i,n//i)
ans = []
for k,v in d.items():
  ans.append((k-1)+(v-1))
print(min(ans))
x = int(input())
y = int(input())
z = int(input())
result = [z,x,y]
print(*result, sep=" ")

### FIXED CODE ###

A,B,C= map(int,input().split())
print(C,A,B)
n,q = map(int,input().split())
s = input()
for i in range(n):
    l,r = map(int,input().split())
    print(s[l-1:r].count("AC"))

### FIXED CODE ###

n,q = map(int,input().split())
s = input().replace("AC","aC")
L = [0]*n
cnt = 0
for i in range(1,n):
    if s[i-1] == "a":
        cnt += 1
    L[i]=cnt
        
for i in range(q):
    l,r = map(int,input().split())
    print(L[r-1] - L[l-1])
a,b=map(int,inpu().split())
x,y = [list(map(int,input().split())) for i in range(a)]
if b < max(y):
  print("TLE")
else:
  for i in range(a):
    if b > y[i] and a > x[i]:
      a = x[i]
  print(a)
    

### FIXED CODE ###

N,T = map(int,input().split())
m = 1001
for i in range(N):
  c,t=map(int,input().split())
  if t<=T:
    m = min(m,c)
print("TLE" if m == 1001 else m)
sx, sy, tx, ty = map(int, input().split())
ofs = 1001
visited = [[0] * 2003 for _ in range(2003)]
stoij = {'U':[0, 1], 'D':[0,-1], 'L':[-1, 0], 'R':[1, 0]}

from collections import deque
def bfs(si, sj, gi, gj):
    q = deque([[si, sj, '']])
    visitedinbfs = [[0] * 2003 for _ in range(2003)]
    visitedinbfs[sj][si] = 1

    while q:
        i, j, s = q.popleft()
        if i == gi and j == gj:
            break

        for ns in ['U', 'D', 'L', 'R']:
            mi, mj = stoij[ns]
            ni, nj = i + mi, j + mj
            if ni < 0 or 2003 <= ni or nj < 0 or 2003 <= ni:
                continue
            if visitedinbfs[nj][ni] == 1 or visited[nj][ni] == 1:
                continue
            visitedinbfs[nj][ni] = 1
            q.append([ni, nj, s+ns])

    for ss in s:
        mi, mj = stoij[ss]
        si += mi
        sj += mj
        if si == gi and sj == gj:
            break
        visited[sj][si] = 1
    return s

ans =  bfs(sx+ofs, sy+ofs, tx+ofs, ty+ofs)
ans += bfs(tx+ofs, ty+ofs, sx+ofs, sy+ofs)
ans += bfs(sx+ofs, sy+ofs, tx+ofs, ty+ofs)
ans += bfs(tx+ofs, ty+ofs, sx+ofs, sy+ofs)
print(ans)


### FIXED CODE ###

sx, sy, tx, ty = map(int, input().split())
dy = ty - sy
dx = tx - sx
ans = dy*'U' + dx*'R' + dy*'D' + dx*'L'
ans += 'L' + (dy+1)*'U' + (dx+1)*'R' + 'D'
ans += 'R' + (dy+1)*'D' + (dx+1)*'L' + 'U'
print(ans)
X,Y,Z= map(int, input().split())
print(max(X//(Z+Y)))

### FIXED CODE ###

X,Y,Z= map(int, input().split())
print((X-Z)//(Z+Y))
import sys

a=input()
b=input()
c=[]
d=[]
for i in range(len(a)):
    c.append(a[i])
for i in range(len(b)):
    d.append(b[i])
c.sort()
d.reverse()
for i in range(len(a)):
    if(c[i]<d[i]):
        print("Yes")
        sys.exit()
if(len(a)<len(b)):
    if(a==b[0:len(a)]):
        print("Yes")
        sys.exit()
print("No")

### FIXED CODE ###

import sys

a=input()
b=input()
c=[]
d=[]
for i in range(len(a)):
    c.append(a[i])
for i in range(len(b)):
    d.append(b[i])
c.sort()
d.sort()
d.reverse()
for i in range(min([len(a),len(b)])):
    if(c[i]<d[i]):
        print("Yes")
        sys.exit()
if(len(a)<len(b)):
    if(a==b[0:len(a)]):
        print("Yes")
        sys.exit()
print("No")
n=input().split()
a=int(n[0])
b=int(eval(n[1]+'*100'))
print(b)
if b<1:
  print(int(a*b))
else:
  #print(int(b*100)*a)
  print(int(str(b*a)[:-2]))


### FIXED CODE ###

from decimal import Decimal
a,b=map(Decimal,input().split())
print(int(a*b))
input_arr = input("").split(" ")
a, b, c = map(str, input_arr)

print(f"{c} {a} {b}")

### FIXED CODE ###

input_arr = input("").split(" ")
a, b, c = map(str, input_arr)

print(c + " " + a + " " + b)
import collections

s = [int(i) for i in input().split(" ")]
print(s)
p = [int(i) for i in input().split(" ")]
print(p)
a = []
p.sort()
print(p)

for i in range(0,s[1]):
	a = p[i]
b = [int(b) for b in a]
print(sum(b))


### FIXED CODE ###

import collections

s = [int(i) for i in input().split(" ")]
p = [int(i) for i in input().split(" ")]
p.sort()
a = []

for i in range(0,s[1]):
	a.append(p[i])
print(sum(a))