Harryxun/stf_run huggingface dataset:
import sys
 
while True :
    a, b = map(int, sys.stdin.readline())
    if (a == 0) & (b == 0) :
        break
    
    if a < b : print(a, b)
    else : print(b, a)

### FIXED CODE ###

import sys
   
while True:
    (x, y) = [int(i) for i in sys.stdin.readline().split(' ')]
   
    if x == 0 and y == 0:
        break
   
    if x > y:
        z = x
        x = y
        y = z
   
    print(x, y)
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n,m,v,p = inpl()
a = inpl()
c = Counter(a)
a.sort()
b_num = a[n-p]
d_cnt = 0
b_cnt = 0
u_cnt = 0
for i in a:
    if i < b_num: d_cnt += 1
    elif i == b_num: b_cnt += 1
    else: u_cnt += 1

def f(x,i):
    if x >= b_num:
        return True
    if x + m < b_num:
        return False
    if i + u_cnt >= v-1:
        return True
    cnt = 0
    for ind,item in enumerate(a):
        if item > b_num or item <= x:
            cnt += m
        else:
            cnt += x + m - item
    if cnt >= m*v:
        return True
    else:
        return False

ok = n-1
ng = 0
while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    if f(a[mid],mid):
        ok = mid
    else:
        ng = mid
print(n-mid)


### FIXED CODE ###

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n,m,v,p = inpl()
a = inpl()
c = Counter(a)
a.sort()
b_num = a[n-p]
d_cnt = 0
b_cnt = 0
u_cnt = 0
for i in a:
    if i < b_num: d_cnt += 1
    elif i == b_num: b_cnt += 1
    else: u_cnt += 1

def f(x,i):
    if x >= b_num:
        return True
    if x + m < b_num:
        return False
    if i + 1 + u_cnt >= v:
        return True
    cnt = 0
    for item in a:
        if item > b_num or item <= x:
            cnt += m
        else:
            cnt += x + m - item
    # print(cnt)
    if cnt >= m*v:
        return True
    else:
        return False
# print(f(a[2],2))
ok = n
ng = -1
while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    if f(a[mid],mid):
        ok = mid
    else:
        ng = mid
print(n-ng-1)
import itertools

def calc(n):
    for op in itertools.product(operators, repeat=3):
        for form in forms:
            formula = form.format(op[0], op[1], op[2], n[0], n[1], n[2], n[3])
            if eval(formula) == 10:
                print(formula)
                return True
    return False

operators = ("+", "-", "*")

forms = (
  "(({3}{0}{4}){1}{5}){2}{6}",
  "({3}{0}{4}){1}({5}{2}{6})",
  "({3}{0}({4}{1}{5})){2}{6}",
  "{3}{0}(({4}{1}{5}){2}{6})",
  "{3}{0}({4}{1}({5}{2}{6}))",
)

while (True):
    nums = tuple(map(int, raw_input().split()))
    if nums == (0,0,0,0):
        break
    for n in itertools.permutations(nums):
        if calc(n):
            break
    else:
        print(0)

### FIXED CODE ###

import itertools

def calc(n):
    for op in itertools.product(operators, repeat=3):
        for form in forms:
            formula = form.format(op[0], op[1], op[2], n[0], n[1], n[2], n[3])
            if eval(formula) == 10:
                print(formula)
                return True
    return False

operators = ("+", "-", "*")

forms = (
  "(({3}{0}{4}){1}{5}){2}{6}",
  "({3}{0}{4}){1}({5}{2}{6})",
  "({3}{0}({4}{1}{5})){2}{6}",
  "{3}{0}(({4}{1}{5}){2}{6})",
  "{3}{0}({4}{1}({5}{2}{6}))",
)

while (True):
    nums = tuple(map(int, input().split()))
    if nums == (0,0,0,0):
        break
    for n in itertools.permutations(nums):
        if calc(n):
            break
    else:
        print(0)
n = int(input())
ans = float('inf')
temp = 0
for i in range(1,n**(1/2)):
    if n%i == 0:
        temp = max(i, n//i)
        ans = min(temp, ans)
print(len(str(ans)))

### FIXED CODE ###

n = int(input())
ans = float('inf')
temp = 0
for i in range(int(n**(1/2)), 0, -1):
    if n%i == 0:
        temp = max(i, n//i)
        ans = min(temp, ans)
print(len(str(ans)))
def nibun_right(a, x):
 lo, hi = 0, len(a)
 while lo < hi:
  mid = (lo+hi)//2
  if x < a[mid][0]: hi = mid
  else: lo = mid+1
 return lo
N,D,A=map(int,input().split())
lst=[0]*N
for i in range(N):
 lst[i]=list(map(int,input().split()))
 lst[i][1]=int((lst[i][1]-1)/A))+1
lst.sort()
ans=0
print(ans)


### FIXED CODE ###

def nibun_right(a, x, lo=0, hi=None):
 if lo < 0:
  raise ValueError('lo must be non-negative')
 if hi is None:
  hi = len(a)
 while lo < hi:
  mid = (lo+hi)//2
  if x < a[mid][0]: hi = mid
  else: lo = mid+1
 return lo
N,D,A=map(int,input().split())
lst=[0]*N
for i in range(N):
 lst[i]=list(map(int,input().split()))
lst.sort()
DMG=[0]*N
ans=0
for i in range(N):
 if i!=0:
  DMG[i]+=DMG[i-1]
 renji=nibun_right(lst,lst[i][0]+2*D)
 Z=max(int((lst[i][1]-1)/A)+1-DMG[i],0)
 DMG[i]+=Z
 if renji!=N:
  DMG[renji]-=Z
 ans+=Z
print(ans)
a=int(input())
s=input()
list= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
slist = [*s]
ans = str()
for si in slist:
    i = list.find(si)
    ans += list[(i+a)%26]
print(ans)


### FIXED CODE ###

a=int(input())
s=input()
list= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
slist = [c  for c in s]
ans = str()
for si in slist:
    i = list.find(si)
    ans += list[(i+a)%26]
print(ans)
a = int(input())
b = int(input())
n=1
for i in range(a):
    n=min(n*2, n+k)
print(n)

### FIXED CODE ###

a = int(input())
b = int(input())
n=1
for i in range(a):
    n=min(n*2, n+b)
print(n)
a,b = map(int, input.split())

if a>9 and b>9:
    print(-1)
else:
    print(a*b)

### FIXED CODE ###

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

if a > 9 or b > 9:
    print(-1)
else:
    print(a*b)
print(sum(map(int,raw_input().split()))%24)

### FIXED CODE ###

print(sum(map(int,raw_input().split()))%24)
x = int(input())
ans = 0
a = 100
while a < x:
    t = int(t*1.01)
    ans += 1
print(ans)

### FIXED CODE ###

x = int(input())
ans = 0
a = 100
while a < x:
    a = int(a*1.01)
    ans += 1
print(ans)
def North(ls):
    ls[1-1],ls[2-1],ls[5-1],ls[6-1] = ls[2-1],ls[6-1],ls[1-1],ls[5-1]
def East(ls):
    ls[1-1],ls[3-1],ls[4-1],ls[6-1] = ls[4-1],ls[1-1],ls[6-1],ls[3-1]
def West(ls):
    ls[1-1],ls[3-1],ls[4-1],ls[6-1] = ls[3-1],ls[6-1],ls[1-1],ls[4-1]
def South(ls):
    ls[1-1],ls[2-1],ls[5-1],ls[6-1] = ls[5-1],ls[1-1],ls[6-1],ls[2-1]
def Right(ls):
    ls[2-1],ls[3-1],ls[4-1],ls[5-1] = ls[3-1],ls[5-1],ls[2-1],ls[4-1]
def Left(ls):
    ls[2-1],ls[3-1],ls[4-1],ls[5-1] = ls[4-1],ls[2-1],ls[5-1],ls[3-1]

while True:
    n = int(raw_input())
    dice = [1,2,3,4,5,6] 
    # top, south, east, west, north, bottom
    direction = ""
    total = 1
    for k in range(n):
        direction = str(raw_input())
        if direction=="North":
            North(dice)
        elif direction=="East":
            East(dice)
        elif direction=="West":
            West(dice)
        elif direction=="South":
            South(dice)
        elif direction=="Right":
            Right(dice)
        elif direction=="Left":
            Left(dice)
        total += dice[0]
    print total
    

### FIXED CODE ###

def North(ls):
    ls[1-1],ls[2-1],ls[5-1],ls[6-1] = ls[2-1],ls[6-1],ls[1-1],ls[5-1]
def East(ls):
    ls[1-1],ls[3-1],ls[4-1],ls[6-1] = ls[4-1],ls[1-1],ls[6-1],ls[3-1]
def West(ls):
    ls[1-1],ls[3-1],ls[4-1],ls[6-1] = ls[3-1],ls[6-1],ls[1-1],ls[4-1]
def South(ls):
    ls[1-1],ls[2-1],ls[5-1],ls[6-1] = ls[5-1],ls[1-1],ls[6-1],ls[2-1]
def Right(ls):
    ls[2-1],ls[3-1],ls[4-1],ls[5-1] = ls[3-1],ls[5-1],ls[2-1],ls[4-1]
def Left(ls):
    ls[2-1],ls[3-1],ls[4-1],ls[5-1] = ls[4-1],ls[2-1],ls[5-1],ls[3-1]

while True:
    try:
        n = int(raw_input())
        if n==0:
            break
        dice = [1,2,3,4,5,6] 
        # top, south, east, west, north, bottom
        direction = ""
        total = 1
        for k in range(n):
            direction = str(raw_input())
            if direction=="North":
                North(dice)
            elif direction=="East":
                East(dice)
            elif direction=="West":
                West(dice)
            elif direction=="South":
                South(dice)
            elif direction=="Right":
                Right(dice)
            elif direction=="Left":
                Left(dice)
            total += dice[0]
        print total
    except EOFError:
        break
N=int(input())
X=[]
for i in range(1,10):
  for j in range(1,10):
    X.append(i*j)
if N in X:
  print("Yes")
else:
  prinnt("No")


### FIXED CODE ###

N=int(input())
A="No"
for i in range(1,10):
  for j in range(1,10):
    if i*j==N:
      A="Yes"
print(A)
N = int(input())
S = input()
 
num = 0
for i in len(S)-2:
  if S[i:i+2] = "ABC":
    num += 1
  else:
    num = num
print(num)

### FIXED CODE ###

N = int(input())
S = str(input())

num = 0
for i in range(N-2):
  if S[i:i+3] == "ABC":
    num += 1
  else:
    num += 0
print(num)
import itertools
 
N = int(input())
K = int(input())
p = list(map(int, input().strip().split()))
lists = []
for l in itertools.combinations(p, K):
  sums = sum(list(l))
  lists.append(sums)
 
print(min(lists))


### FIXED CODE ###

S = list(map(int, input().strip().split()))
N = S[0]
K = S[1]
p = list(map(int, input().strip().split()))
lists = []
for l in range(K):
  lists.append(min(p))
  p.remove(min(p))
  
print(sum(lists))
#coding:utf-8import bisectfrom collections import dequeimport syssys.setrecursionlimit(10**6)write = sys.stdout.writedbg = lambda *something : print(*something) if DEBUG else 0DEBUG = Truedef index(a,b):    return str(min(a,b)) + , +  str(max(a, b))def main(given = sys.stdin.readline):    input = lambda : given().rstrip()    LMIIS = lambda : list(map(int,input().split()))    II = lambda : int(input())    XLMIIS = lambda x : [LMIIS() for _ in range(x)]    s = input()    if s[0] == s[1] == s[2]:        print(No)    elif s[0] == s[1] and s[2] == s[3]:        print(Yes)    elif s[0] == s[2] and s[1] == s[3]:        print(Yes)    elif s[0] == s[3] and s[1] == s[2]:        print(Yes)    else:        print(No)if __name__ == '__main__':    main()

### FIXED CODE ###

S = input()

a = 1
b = 1
first = S[0]
second = ""
for i in range(3):
    if S[i+1] == first:
        a += 1
    elif second == "":
        second = S[i+1]
    elif second == S[i+1]:
        b+= 1

if a == 2 and b == 2:
    print("Yes")
else:
    print("No")
import math


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


N = int(input())
A = list(map(int, input().split()))
l = A[0]
mod = 10**9+7
ans = 0
for i in range(1, N):
    l = lcm(l, A[i])
for i in range(N):
    ans += l // A[i]
print(ans % mod)


### FIXED CODE ###

import fractions


def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


N = int(input())
A = list(map(int, input().split()))
l = A[0]
mod = 10**9+7
ans = 0
for i in range(1, N):
    l = lcm(l, A[i])
for i in range(N):
    ans += l // A[i]
print(ans % mod)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,Q = map(int,readline().split())
ABPX = list(map(int,read().split()))
AB = iter(ABPX[:N+N-2])
PX = iter(ABPX[N+N-2:])

graph = [[] for _ in range(N+1)]
for a,b in zip(AB,AB):
    graph[a].append(b)
    graph[b].append(a)

val = [0] * (N+1)
for p,x in zip(PX,PX):
    val[p] += x

stack = [1]

parent = [0] * (N+1)
while stack:
    x = stack.pop()
    for y in graph[x]:
        if y == parent[x]:
            continue
        parent[y] = x
        stack.append(y)
        val[y] += val[x]

print(' '.join(map(std,val[i:])))


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,Q = map(int,readline().split())
ABPX = list(map(int,read().split()))
AB = iter(ABPX[:N+N-2])
PX = iter(ABPX[N+N-2:])

graph = [[] for _ in range(N+1)]
for a,b in zip(AB,AB):
    graph[a].append(b)
    graph[b].append(a)

val = [0] * (N+1)
for p,x in zip(PX,PX):
    val[p] += x

stack = [1]

parent = [0] * (N+1)
while stack:
    x = stack.pop()
    for y in graph[x]:
        if y == parent[x]:
            continue
        parent[y] = x
        stack.append(y)
        val[y] += val[x]

print(' '.join(map(str,val[1:])))
s=input()
m=(s-s%60)/60
s=s%60
h=(m-m%60)/60
m=m%60
print h:m:s

### FIXED CODE ###

t=input()
h=t/3600
m=(t%3600)/60
s=t%60

print "%d:%d:%d" %(h,m,s)
import sys
sys.setrecursionlimit(1000001)

n, m = map(int, input().rstrip().split())
dist = [[500000 for i in range(n)]for j in range(n)]

for i in range(n):
    for j in range(n):
        if (i==j):
            dist[i][j]=0

a = []
b = []
c = []

for i in range(m):
    x, y, z = map(int, input().rstrip().split())
    dist[x-1][y-1] =  min(dist[x-1][y-1], z)
    dist[y-1][x-1] =  min(dist[x-1][y-1], z)
    a.append(x-1)
    b.append(y-1)
    c.append(z)
    
for k in range(n):
    for i in range(n):
        for j in range(n):
            dist[i][j]=min(dist[i][j],dist[i][k]+dist[k][j])
#print(dist)
result = m

for i in range(m):
    for j in range(m):
        if dist[j][a[i]] + c[i] == dist[j][b[i]]:
            result -= 1
            break

print(result)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000001)

n, m = map(int, input().rstrip().split())
dist = [[500000 for i in range(n)]for j in range(n)]

for i in range(n):
    for j in range(n):
        if (i==j):
            dist[i][j]=0

a = []
b = []
c = []

for i in range(m):
    x, y, z = map(int, input().rstrip().split())
    dist[x-1][y-1] =  min(dist[x-1][y-1], z)
    dist[y-1][x-1] =  min(dist[x-1][y-1], z)
    a.append(x-1)
    b.append(y-1)
    c.append(z)
    
for k in range(n):
    for i in range(n):
        for j in range(n):
            dist[i][j]=min(dist[i][j],dist[i][k]+dist[k][j])
#print(dist)
result = m

for i in range(m):
    for j in range(n):
        if dist[j][a[i]] + c[i] == dist[j][b[i]]:
            result -= 1
            break

print(result)
n=int(input())
d=list(map(int,input().split()))

from collections import Counter
q=Counter(d)

if d[0]!=0:
    print(0)
    exit()

ans=1
for i in range(1,max(D)+1):
    ans*=q[i-1]**q[i]
print(ans%998244353)

### FIXED CODE ###

n = int(input())
d = list(map(int,input().split()))
 
from collections import Counter
q=Counter(d)

# 例外対応
if q[0]!=1 or d[0]!=0:
  print(0)
  exit()

ans = 1
for i in range(1,max(d)+1):
  ans *= q[i-1]**q[i]
  if ans == 0:
    break
print(ans%998244353)
import numpy as np
N, M = map(int, input().split())
cities = {}
P = {}
Y = {}
for i in range(M):
    p,y = map(int, input().split())
    cities[i] = p
    Y[i] = y

ans = []
sorted_Y = sorted(Y.items(), key=lambda x:x[1])
P_i = np.zeros(N)
for i,y in sorted_Y:
    p = cities[i]
    P_i[p] += 1
    ans.append(p,P_i[p])

for p,x in ans:
    print('{0:06}{1:06}'.format(p, x))


### FIXED CODE ###

import numpy as np
N, M = map(int, input().split())
cities = {}
P = {}
Y = {}
for i in range(M):
    p,y = map(int, input().split())
    cities[i] = p
    Y[i] = y

ans = {}
sorted_Y = sorted(Y.items(), key=lambda x:x[1])
P_i = np.zeros(N)
for i,y in sorted_Y:
    p = cities[i]
    P_i[p-1] += 1
    ans[i] = (p, int(P_i[p-1]))

for i in range(M):
    print('{0:06}{1:06}'.format(ans[i][0], ans[i][1]))
n = int(input())
s = input()
count = 0
for i in range(n):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count +=1
print(count)

### FIXED CODE ###

n = int(input())
s = input()
count = 0
for i in range(n-2):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count +=1
print(count)
n= int(input())
if n = 1:
  print("Hello World")
  exit()

a = int(input())
b = int(input())
print(a+b)

### FIXED CODE ###

n= int(input())
if n == 1:
  print("Hello World")
  exit()
else:
  a = int(input())
  b = int(input())
  print(a+b)
S = input()
cnt = 0
for i in range(len(S)):
  if i==0 and S[i]!="A":
    print("WA")
    exit()
  if 2<=i<=len(i)-2 and S[i]=="C":
    cnt+=1
    if cnt>1:
      print("WA")
      exit()
  if 1<=i<=len(i)-1:
    if S[i]!="C" and S[i].isupper():
      print("WA")
      exit()
print("AC")
    

### FIXED CODE ###

S = input()
cnt = 0
for i in range(len(S)):
  if i==0 and S[i]!="A":
    print("WA")
    exit()
  if 2<=i<=len(S)-2 and S[i]=="C":
    cnt+=1
    if cnt>1:
      print("WA")
      exit()
  if 1<=i<=len(S)-1:
    if S[i]!="C" and S[i].isupper():
      print("WA")
      exit()
if cnt<1:
  print("WA")
  exit()
print("AC")
num = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
sum = 0

for i in range(num):
	if i == 0:
		sum += b[a[i]]
	else:
		sum += b[a[i]]
		if (a[i]-1) == a[i-1]:
			sum += c[i-1]

print(sum)
          

### FIXED CODE ###

num = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
sum = 0
 
for i in range(num):
	if i == 0:
		sum += b[a[i]-1]
	else:
		sum += b[a[i]-1]
		if (a[i]-1) == a[i-1]:
			sum += c[a[i-1]-1]
 
print(sum)
ini=raw_input()
a=list(ini)
check=0
if "C" in list and "F" in list:
    if list.index("C")<list.index("F"):
        check=1
if check==1:
    print "Yes"
else:
    print "No"

### FIXED CODE ###

ini=raw_input()
a=list(ini)
check=0
if "C" in a and "F" in a:
	c=a.index("C")
	f=0
	for i in range(len(a)):
		if a[i]=="F":
			f=i
	if c<f:
		check=1
if check==1:
	print "Yes"
else:
	print "No"
N,M = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]

sortAB = sorted(AB)

ans = 0
num = M
for i in sortAB:
    a,b = i
    if num >= b:
        num -= b
        ans += a* b
    else:
        ans += i * num
        break

print(ans)

### FIXED CODE ###

N,M = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]

sortAB = sorted(AB)

ans = 0
num = M
for i in sortAB:
    a,b = i
    if num >= b:
        num -= b
        ans += a* b
    else:
        ans += a * num
        break

print(ans)
from functools import reduce
import math

def solve(N, a):
	m = reduce(lambda x, y: x*y, a) // reduce(math.gcd, a) - 1
	ans = 0
	for ai in a:
		ans += m % ai
	return ans

if __name__ == '__main__':
	N = int(input())
	a = list(map(int, input().split()))
	print(solve(N,a))

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
print(sum(a) - N)
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
  
def prod(n):
  result = 1
  for x in n:
    result *= x
  return result
  
a = prime_factorize(n)
b = [a.pop(-1)]

while prod(a) > prod(b):
  prev_result = prod(a) + prod(b)
  b.append(a.pop(0))

  if prev_result < prod(a) + prod(b):
    a.append(b.pop(-1))
    break
  
print(prod(a)-1 +prod(b)-1)


### FIXED CODE ###

a, b = [int(x) for x in input().split()]
if a <= 9 and b <= 9:
  print(a*b)
else:
  print(-1)
N, K = list(map(int, input().split()))
a_list = list(map(int, input().split()))

done_list = [1]
cur_place = 1
flag = True
for i in range(K):
    if a_list[cur_place-1] not in done_list:
        cur_place = a_list[cur_place-1]
        done_list.append(cur_place)
    else:
        period = len(done_list) - done_list.index(a_list[cur_place-1])
        print(done_list[done_list.index(a_list[cur_place-1]) + (K - i) % period + 1])
        flag = False
        break

if flag:        
    print(cur_place)
    

### FIXED CODE ###

N, K = list(map(int, input().split()))
a = [0] + list(map(int, input().split()))

before = 1
start = 0
end = 0

if K <= N:
    for i in range(K):
        before = a[before]
    print(before)

# 周期がどこからどこまでかっていうのを求めると逆に時間がかかってしまうので、N回移動したあとの街っていうのをマークしたほうがはやい
    
else:
    market_town = 0
    for i in range(N):
        before = a[before]
    marked_town = before
    K -= N
    counter = 1
    while marked_town != a[before]:
        before = a[before]
        counter += 1
    K = K % counter
    for i in range(K+1):
        before = a[before]
    print(before)
import numpy as np

D = int(input())
c = np.array(list(map(int, input().split())))
s = np.array([list(map(int, input().split())) for x in range(D)])

l_opt = np.array(list(range(1, 27)) * (D // 26) + list(range(1, D % 26 + 1)))
l_max = s.argmax(axis=1) + 1

for day in range(1, D + 1):
    if day * s[l_opt[day - 1] - 1] < s[l_max[day - 1] - 1]:
        l_opt[day - 1] = l_max[day - 1]

for l in l_opt:
    print(l)

### FIXED CODE ###

import numpy as np

D = int(input())
c = np.array(list(map(int, input().split())))
s = np.array([list(map(int, input().split())) for x in range(D)])

l_opt = s.argmax(axis=1)
for l in l_opt:
    print(l + 1)
N,M = map(int,input().split())
bri = [[int(i) for i in input().split()]for i in range(M)]

def benri(x,con):
    #conにxが含まれていたらconを返す
    if x in con :
        return con
    else:
        con.append(x)
    #探索するよ
    for i in bri:
        if x in i:
            con=(benri(i[i[0]==x],con))
    return con

for i in range(1,M+1):
    bri.pop(0)
    #不便さを図るよ
    sima = []
    fuben = []
    for j in range(1,N+1):
        if not(j in sima):
            #simaからbenriを排除
            fubencount = 0
            AAA = benri(j,[])
            for k in AAA:
                sima.append(k)
            fuben.append(len(AAA))
    fubendo = 0
    
    f = (N*(N-1))/2
    for j in fuben:
        f -= (j*(j-1))/2
    print(f)


### FIXED CODE ###

N,M = map(int,input().split())
AB = list(list(map(int,input().split()))for i in range(M))
AB.reverse()
node = [[i,[i]]for i in range(N)]
ans = [(N*(N-1))//2]
for a,b in AB:
    a,b = min(node[a-1][0],node[b-1][0]),max(node[a-1][0],node[b-1][0])
    if a != b:
        ans.append(ans[-1]-len(node[a][1])*len(node[b][1]))
        for i in node[b][1]:
            node[i][0] = a
            node[i][1] = [i]
            node[a][1].append(i)
    else:
        ans.append(ans[-1])
ans.reverse()

for i in ans[1:]:
    print(i)
import sys
from itertools import permutations
import math
from operator import itemgetter

s=input()
t=input()

flag2=True
for i in reversed(range(len(s))):
    if s[i]==t[0]:
        flag=True
        for j in range(1,len(t)):
            if (s[i+j]!=t[j]) & (s[i+j]!='?'):
                flag=False
        if flag:
            s=s[:i]+t+s[i+len(t):] 
            s=s.replace('?','a')
            print(s)
            flag2=False
            sys.exit()

if flag2:
    print('UNRESTORABLE')





### FIXED CODE ###

import sys
from itertools import permutations
import math
from operator import itemgetter

s=input()
t=input()

if len(s)<len(t):
    print('UNRESTORABLE')
    sys.exit()

flag2=True
for i in reversed(range(len(s)-len(t)+1)):
    if (s[i]==t[0]) | (s[i]=='?'):
        flag=True
        for j in range(1,len(t)):
            if (s[i+j]!=t[j]) & (s[i+j]!='?'):
                flag=False
        if flag:
            s=s[:i]+t+s[i+len(t):] 
            s=s.replace('?','a')
            print(s)
            flag2=False
            sys.exit()

if flag2:
    print('UNRESTORABLE')
n=int(input())

ch=[0]*10001

for i in range(1,100):
  for j in range(1,100):
    for k in range(1,100):
      x=i**2+j**2+k**2+i*j+j*k+k*i
      if x<=10000:
        ch[x]+=1
for i in range(n):
  print(ch[i+1])


### FIXED CODE ###

x,y,d=map(int,input().split())
ans=0
for i in range(x,y+1):
  if i%d==0:
    ans+=1
print(ans)
k,s = int(input())
ans = 0
for x in range(k+1):
  for y in range(k+1):
    for z in range(k+1):
      if x + y + z == s:
        ans += 1
print(ans)

### FIXED CODE ###

k,n = map(int,input().split())
ans = 0
for i in range(k+1):
  for j in range(k+1):
    if 0 <= n-i-j <= k:
      ans+=1
print(ans)
a,b = map(int, input().split())
result = a * b
if result % 2 = 0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

a,b = map(int, input().split())
print("Even" if (a*b)%2==0 else "Odd")