Harryxun/stf_run huggingface dataset:
s=input()
t=input()
k=[]
for i in range(len(t)):
    k.append(s[i])
    k.append(t[i])
if len(s)>len(t):
    t.append(s[len(s)-1])
print("".join(k))


### FIXED CODE ###

s=input()
t=input()
k=[]
for i in range(len(t)):
    k.append(s[i])
    k.append(t[i])
if len(s)>len(t):
    k.append(s[len(s)-1])
print("".join(k))
L, R = map(int, input().split())

Answers = []

for i in range(R-L):
  for j in range(R-L-i-1):
    Answers.append((L+i)*(L+i+j+1)%2019)

#print(len(Answer))

print(min(Answers))

### FIXED CODE ###

L,R = map(int,input().split())
MOD = 2019
ans = 2020
if R - L > 2010:
  print(0)
  exit()
for i in range(L,R):
    for j in range(i+1,R+1):
        ans = min(ans,i*j%MOD)
print(ans)
a,b = map(int,input().split())
num = 1
for i in range(a,b+1):
  num = num * i
if num>0:
  print("Positive")
elif num<0:
  pirnt("Negative")
else:
  print("Zero")

### FIXED CODE ###

a,b = map(int,input().split())
if a == 0 or b == 0:
    print("Zero")
else:
    if 0<a<=b:
        print("Positive")
    elif a<=0<b:
        print("Zero")
    elif a<=b<0:
        if abs(a+b)%2 == 0:
            print("Negative")
        else:
            print("Positive")
a,b=int(input().split())
c=a+b
if c%2==0:
  print(int(c/2))
else:
  print("IMPOSSIBLE")


### FIXED CODE ###

a,b=map(int,input().split())
c=a+b
if c%2==0:
  print(int(c/2))
else:
  print("IMPOSSIBLE")
a, b = map(int, input().split())


if (a*b) % 2 == 0:
        print('Even')
    else:
        print('Odd')


### FIXED CODE ###

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

if (a*b)%2 == 0:
	print("Even")
else:
	print("Odd")
N, M = [int(i) for i in input().split()]

if M >= 1500:
      print(aaa)
    
else:
  print("a")

### FIXED CODE ###

from collections import defaultdict
from heapq import heappop, heappush


class Graph(object):
    """
    隣接リストによる有向グラフ
    """

    def __init__(self):
        self.graph = defaultdict(list)

    def __len__(self):
        return len(self.graph)

    def add_edge(self, src, dst, weight=1):
        self.graph[src].append((dst, weight))

    def get_nodes(self):
        return self.graph.keys()


class Dijkstra(object):
    """
    ダイクストラ法（二分ヒープ）による最短経路探索
    計算量: O((E+V)logV)
    """

    def __init__(self, graph, start):
        self.g = graph.graph

        # startノードからの最短距離
        # startノードは0, それ以外は無限大で初期化
        self.dist = defaultdict(lambda: float('inf'))
        self.dist[start] = 0

        # 最短経路での1つ前のノード
        self.prev = defaultdict(lambda: None)

        # startノードをキューに入れる
        self.Q = []
        heappush(self.Q, (self.dist[start], start))

        while self.Q:
            # 優先度（距離）が最小であるキューを取り出す
            dist_u, u = heappop(self.Q)
            if self.dist[u] < dist_u:
                continue
            for v, weight in self.g[u]:
                alt = dist_u + weight
                if self.dist[v] > alt:
                    self.dist[v] = alt
                    self.prev[v] = u
                    heappush(self.Q, (alt, v))

    def shortest_distance(self, goal):
        """
        startノードからgoalノードまでの最短距離
        """
        return self.dist[goal]

    def shortest_path(self, goal):
        """
        startノードからgoalノードまでの最短経路
        """
        path = []
        node = goal
        while node is not None:
            path.append(node)
            node = self.prev[node]
        return path[::-1]


g = Graph()
N, M = [int(i) for i in input().split()]


for i in range(M):
    u, v = [int(i) for i in input().split()]
    g.add_edge(u-1, v-1, 1)
    g.add_edge(u-1+N, v-1, 1)
    g.add_edge(u-1, v-1+N, 1)

d = Dijkstra(g, 0)

ans_n = 10 ** 6
ans_index = -1
for i in range(N):
    d = Dijkstra(g, i)
    ans_n_ = d.dist[i+N]

    if ans_n_ < ans_n:
        ans_index = i
        ans_n = ans_n_

if ans_n == 10 ** 6:
    print(-1)
else:
    d = Dijkstra(g, ans_index)
    ans = d.shortest_path(ans_index + N)
    ans.sort()
    print(ans_n)
    for j in range(ans_n):
        print(ans[j]+1)
N,A = map(int, input().split())
print(N*N - A)

### FIXED CODE ###

N = int(input())
A = int(input())
print(N*N-A)
from collections import deque, defaultdict, Counter
from math import floor, ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
a = N % 1000
if 0 <= N < 1000:
    print(N)
else:
    print(a)


# for i in range(1, 10+1):
#     have = 1000 * i

#     if 0 <= have - N < 1000:
#         print(have - N)
#         exit()


### FIXED CODE ###

from collections import deque, defaultdict, Counter
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
a = N % 1000
# if 0 <= N < 1000:
#     print(N)
if N % 1000 == 0:
    print(0)
else:
    print(1000 - a)


# for i in range(1, 10+1):
#     have = 1000 * i

#     if 0 <= have - N < 1000:
#         print(have - N)
#         exit()
N , K = input().split()
Dk = list(map(int, input().split()))

for i in range(N,10*N+1):
    if set(i)&set(Dk) == set():
        print(i)

### FIXED CODE ###

N , K = map(int, input().split())
Dk = input().split()

for i in range(N,10*N+1):
    if set(str(i))&set(Dk) == set():
        print(i)
        break
s=input()
t=input()
for i in range(3)
ans=0
if s[i]==t[i]:
  ans+=1
print(ans)

### FIXED CODE ###

s=input()
t=input()
ans=0
for i in range(3):
  if s[i]==t[i]:
    ans+=1
print(ans)
n = int(input())
point_list = []
for i in range(n):
  x, y = map(int, input().split())
  point_list.append((x, y))

sabun_dict = {}

for i in range(1, n):
  for j in range(i):
    x = point_list[i][0] - point_list[j][0]
    y = point_list[i][1] - point_list[j][1]
    if (x, y) in sabun_dict:
      sabun_dict[(x, y)] = sabun_dict[(x, y)] + 1
    else:
      sabun_dict[(x, y)] = 1

max_v = max(sabun_dict.values())

print(n - max_v)


### FIXED CODE ###

n = int(input())
point_list = []
for i in range(n):
  x, y = map(int, input().split())
  point_list.append((x, y))

sabun_dict = {}

if n == 1:
  print(1)
  exit()

for i in range(n):
  for j in range(n):
    x = point_list[i][0] - point_list[j][0]
    y = point_list[i][1] - point_list[j][1]
    if x == 0 and y == 0:
      continue
    if (x, y) in sabun_dict:
      sabun_dict[(x, y)] = sabun_dict[(x, y)] + 1
    else:
      sabun_dict[(x, y)] = 1

max_v = max(sabun_dict.values())

print(n - max_v)
num = input()
lst = lst(map(int, num))
ele = lst[-1]
if ele==2 or ele==4 or ele==5 or ele==7 or ele==9:
  	print("hon")
elif ele==1 or ele==6 or ele==8:
 	print("pon")
elif ele==3
	print("bon")

### FIXED CODE ###

num = input()
lst = list(map(int, num))
ele = lst[-1]
if ele==2 or ele==4 or ele==5 or ele==7 or ele==9:
  	print("hon")
elif ele==0 or ele==1 or ele==6 or ele==8:
 	print("pon")
elif ele==3:
	print("bon")
def fill0(A,H,W,s,x,y):
	if 0 <= x <= W-1 and 0 <= y <= H-1 and A[y][x] == s:
		A[y][x] = 0
		fill0(A,H,W,s,x+1,y); fill0(A,H,W,s,x,y+1); fill0(A,H,W,s,x-1,y); fill0(A,H,W,s,x,y-1)
while 1:
	H,W = map(int,raw_input().split())
	if H == 0: break
	A = [list(raw_input()) for i in range(H)]
	ans = 0
	for y in range(H):
		for x in range(W):
			if A[y][x] in ["#","@","*"]:
				fill0(H,W,A[y][x],x,y)
				ans += 1
	print ans

### FIXED CODE ###

import sys
sys.setrecursionlimit(20000)
def solve(h,w,count,c):
    if 0 <= h < H and 0 <= w < W and A[h][w] == c:
        A[h][w] = count
        for dh,dw in zip([1,0,-1,0],[0,1,0,-1]):
            solve(h+dh,w+dw,count,c)
while 1:
    H,W = map(int,raw_input().split())
    if H == W == 0: break
    A = [list(raw_input()) for _ in range(H)]
    count = 0
    for h in range(H):
        for w in range(W):
            if type(A[h][w]) is not int:
                solve(h,w,count,A[h][w])
                count += 1
    print count
from math import factorial

n, m = map(int, input().split())
if n == 1 and m == 1:
    ans = 0
elif n == 1:
    ans = factorial(m) // (factorial(m - 2) * factorial(2))
elif m == 1:
    ans = factorial(n) // (factorial(n - 2) * factorial(2))
else:
    ans = factorial(n) // (factorial(n - 2) * factorial(2))
    ans += factorial(m) // (factorial(m - 2) * factorial(2))
print(ans)


### FIXED CODE ###

from math import factorial

n, m = map(int, input().split())
if n in [0, 1] and m in [0, 1]:
    ans = 0
elif n in [0, 1]:
    ans = factorial(m) // (factorial(m - 2) * factorial(2))
elif m in [0, 1]:
    ans = factorial(n) // (factorial(n - 2) * factorial(2))
else:
    ans = factorial(n) // (factorial(n - 2) * factorial(2))
    ans += factorial(m) // (factorial(m - 2) * factorial(2))
print(ans)
N=int(inpu())
ans=[]
dic={}
for i in range(N):
  let=input()
  if let in dic.keys:
    dic.update({let:1})
  else:
    dic.update({let:dic[let]+1})
score_sorted = sorted(score.items(), key=lambda x:x[1])
a=0
for each in score_sorted.keys():
  if score_sorted[each]>=a:
    ans+=each
    a=score_sorted[each]
  else:
    break
ans.sort()
for each in ans:
  print(each)

### FIXED CODE ###

dic = {}
ans = []
a = 0

N = int( input() )
for i in range( N ):
  let = input()
  if let not in dic:
    dic.update( { let : 1 } )
  else:
    num=dic[ let ]
    dic[ let ] = num + 1
dic_sorted = sorted(dic.items(), key=lambda x:x[1],reverse=True)
for each in dic_sorted:
  if each[1] >= a:
    ans.append(each[0])
    a=each[1]
  else:
    break
ans.sort()
for each in ans:
  print(each)
N=int(input())
S=N(N-1)/2
print(S)

### FIXED CODE ###

N=int(input())
S=(N*(N-1))//2
print(S)
A, B = int(input().split())
C = A*B
if C%2 == 0 :
  print(Even)
else : 
  print(Odd)

### FIXED CODE ###

A, B = map(int,input().split())
C = A*B
if C%2 == 0 :
  print("Even")
else : 
  print("Odd")
def dfs(v):
    for u, w in e[v]:
        if c[u] != -1:
            continue
        c[u] = (c[v] + w) % 2
        dfs(u)


n = int(input())
e = tuple(set() for _ in range(n))
for _ in range(n - 1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1
    e[u].add((v, w))
    e[v].add((u, w))

c = [-1] * n
c[0] = 0

dfs(0)

print(*c, sep='\n')


### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 9)


class UnionFind:
    def __init__(self, n):
        self.v = [-1 for _ in range(n)]  # 根(負): 連結頂点数 * (-1) / 子(正): 根の頂点番号(0-indexed)

    def find(self, x):  # xを含む木における根の頂点番号を返す
        if self.v[x] < 0:  # (負)は根
            return x
        else:  # 根の頂点番号
            self.v[x] = self.find(self.v[x])  # uniteでは, 旧根に属する頂点の根が旧根のままなので更新
            return self.v[x]

    def unite(self, x, y):  # 違う根に属していたらrankが低くなるように連結
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if -self.v[x] < -self.v[y]:  # size比較, 　(-1) * (連結頂点数 * (-1)), (正)同士の大小比較
            x, y = y, x  # 連結頂点数が少ない方をyにすると, findでの更新回数が減る？
        self.v[x] += self.v[y]  # 連結頂点数の和を取る, 連結頂点数 * (-1)
        self.v[y] = x  # 連結頂点数が少ないy(引数yの根の頂点番号)の根をx(引数xの根の頂点番号)にする

    def root(self, x):
        return self.v[x] < 0  # (負)は根

    def same(self, x, y):
        return self.find(x) == self.find(y)  # 同じ根に属するか

    def size(self, x):
        return -self.v[self.find(x)]  # 連結頂点数を返す


N = int(input())
e = [[] for _ in range(N)]
uf = UnionFind(N)
for _ in range(N - 1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1
    # 0-indexedに直した
    e[u].append((v, w))
    e[v].append((u, w))

    uf.same(u, v)

# e[点]:=(隣接頂点,長さ)

root = uf.find(0)
# 根

ans = [None] * N
ans[root] = 0

# print(e)


def rec(vv):
    for nv, w in e[vv]:
        if ans[nv] is not None: continue
        ans[nv] = (ans[vv] + w) % 2
        rec(nv)


rec(root)

print(*ans, sep='\n')
x= list(map(int,input().split()))
for i in x:
  if x[i] == 0:
    print(i+1)
    

### FIXED CODE ###

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

for i in range(5):
  if x[i] == 0:
    print(i+1)
ans = int(input()) - int(input())
if ans < 0:
	print(0)
else:
	print(ans)

### FIXED CODE ###

x,n = map(int,input().split())
ans = x - n
if ans < 0:
	print(0)
else:
	print(ans)
a,b,c,d = map(int,input().split())

x = a+b
y = c+d

if x>:y
    print('Left')
elif x == y:
    print('Balanced')
else:
    print('Right')

### FIXED CODE ###

a,b,c,d = map(int,input().split())

x = a+b
y = c+d

if x>y:
    print('Left')
elif x == y:
    print('Balanced')
else:
    print('Right')
n,k = map(int,input().split())
for i in range(1,n+1):
	a = i
	p = 1/n
	while a < k:
    	a = a*2
    	p = p*0.5
  	pro[i] = p
  
print(sum(pro))
    

### FIXED CODE ###

n,k = map(int,input().split())
pro = []
for i in range(1,n+1):
  a = i
  p = 1/n
  while a < k:
    a = a + a
    p = p * 0.5
  pro.append(p)
  
print(sum(pro))
n,k=map(int,input().split())
p=list(map(int,input().split()))
c=list(map(int,input().split()))
now=-10000000000
for i in range(1,n+1):
    retu=[]
    sum1=0
    sum2=0
    sum3=0
    max1=-10000000000
    max2=-10000000000
    flag=0
    x=i
    while(flag==0):
        x=p[x-1]
        sum1+=c[x-1]
        retu.append(c[x-1])
        if x==i:
            flag=1
    if n>=k:
        for j in range(k):
            sum2+=retu[j]
            if sum2>max1:
                max1=sum2
        ans=max1
    elif sum1<=0:
        for j in range(len(retu)):
            sum3+=retu[j]
            if sum3>max2:
                max2=sum3
        ans=max2
    else:
        w=k%len(retu)
        
        if w==0:
            w=len(retu)
        for j in range(w):
            sum2+=retu[j]
            if sum2>max1:
                max1=sum2
        for j in range(len(retu)):
            sum3+=retu[j]
            if sum3>max2:
                max2=sum3
        if max1+sum1>max2:
            ans=sum1*(k-w)//len(retu)+max1
        else:
            ans=sum1*((k-w)//len(retu)-1)+max2
    now=max(now,ans)
print(now)

### FIXED CODE ###

n,k=map(int,input().split())
p=list(map(int,input().split()))
c=list(map(int,input().split()))
now=-100000000000
for i in range(1,n+1):
    retu=[]
    sum1=0
    sum2=0
    sum3=0
    max1=-1000000000000
    max2=-1000000000000
    flag=0
    x=i
    while(flag==0):
        x=p[x-1]
        sum1+=c[x-1]
        retu.append(c[x-1])
        if x==i:
            flag=1
    if len(retu)>=k: #操作回数が周期未満
        for j in range(k):
            sum2+=retu[j]
            if sum2>max1:
                max1=sum2
        ans=max1
    elif sum1<=0: #周期和が負
        for j in range(len(retu)):
            sum3+=retu[j]
            if sum3>max2:
                max2=sum3
        ans=max2
    else:
        w=k%len(retu)
        
        if w==0:
            w=len(retu)
        for j in range(w):
            sum2+=retu[j]
            if sum2>max1:
                max1=sum2
        for j in range(len(retu)):
            sum3+=retu[j]
            if sum3>max2:
                max2=sum3
        if max1+sum1>max2:
            ans=sum1*(k-w)//len(retu)+max1
        else:
            ans=sum1*((k-w)//len(retu)-1)+max2
    now=max(now,ans)
print(now)
L = input()
MOD = 10**9+7

num_ab = [1]
for i in range(1, len(L)+1):
    num_ab.append((num_ab[-1] * 3) % MOD)

def calc(L, m):
    m %= MOD
    if len(L) == 1:
        return (m * num_ab[int(L)]) % MOD
    elif '0' not in L:
        return (m * num_ab[len(L)]) % MOD
    elif '1' not in L[1:]:
        return ((m * num_ab[len(L) - 1]) % MOD + (2 * m) % MOD) % MOD
    else:
        return ((m * num_ab[len(L) - 1]) % MOD + calc(L[L[1:].index('1') + 1:], 2*m)) % MOD

print(calc(L,1))

### FIXED CODE ###

L = input()
MOD = 10**9+7

num_ab = [1]
for i in range(1, len(L)+1):
    num_ab.append((num_ab[-1] * 3) % MOD)

ans, m = 0, 1
while True:
    if '0' not in L:
        ans = (ans + (m * num_ab[len(L)]) % MOD) % MOD
        print(ans)
        exit()
    elif '1' not in L[1:]:
        ans = (ans + ((m * num_ab[len(L) - 1]) % MOD + (2 * m) % MOD) % MOD) % MOD
        print(ans)
        exit()
    else:
        ans = (ans + (m * num_ab[len(L) - 1]) % MOD) % MOD
        L = L[L[1:].index('1') + 1:]
        m = (2 * m) % MOD
import sys

if __name__ == '__main__':
  N, X = map(input().split(), lambda x: int(x))
  L = map(input().split(), lambda x: int(x))
  D = 0
  count = 0
  for i, l in enumerate(L):
    if D <= X:
      count += 1
    D += l
  print(count)

### FIXED CODE ###

N, X = map(int, input().split())
L = map(int, input().split())
D = 0
count = 1
for i, l in enumerate(L):
  D += l
  if D <= X:
      count += 1
print(count)
import math
t=input()
t=t.split()
a=int(t[0])
b=int(t[1])
x=(b-1)/(a-1)
x=math.ceil(x)
print(x)



### FIXED CODE ###

n=input()
n=int(n)
print(n**3)
while True:
  h,w=map(int,input().split())
  if h==0 & w==0:
    break
  for i in range(h):
    print("#."*w[i%2:][:w])
  print()   


### FIXED CODE ###

while True:
  h,w=map(int,input().split())
  if h==0 & w==0:
    break
  for i in range(h):
    print(("#."* w)[i%2:][:w])
  print()
s = input()
a = 700
for i in range(len(s)):
  if s[i] == "o":
    x += 100
print(x)

### FIXED CODE ###

s = input()
a = 700
for i in range(len(s)):
  if s[i] == "o":
    a += 100
print(a)
import math
import sys

nums = [1] * 1000000
nums[:2] = [0,0]
    
cnt = 0
while cnt <= math.sqrt(n):
    flg = nums[cnt]
    if flg == 1:
        k = 2
        while k*cnt <= n:
            nums[k*cnt] = 0
            k += 1
    cnt += 1


for line in sys.stdin:
    n = int(line)
    print sum(nums[:n+1])

### FIXED CODE ###

import math
import sys

n = 999999
nums = [1] * (n+1)
nums[:2] = [0,0]
    
cnt = 0
while cnt <= math.sqrt(n):
    flg = nums[cnt]
    if flg == 1:
        k = 2
        while k*cnt <= n:
            nums[k*cnt] = 0
            k += 1
    cnt += 1


for line in sys.stdin:
    n = int(line)
    print sum(nums[:n+1])
import sys

if __name__ == '__main__':  
    x, a = sys.argv[1].split(' ')
    if (x < a):
        printf('0')
    else:
        printf('10')

### FIXED CODE ###

import sys                                                                      
 
if __name__ == '__main__':
    s = input().strip().split(' ')
    x = int(s[0])
    a = int(s[1])
    if (x < a): 
        print('0')
    else:
        print('10')
n, k = map(int, input().split())
snk = [-1] * (n + 1)
for j in range(k):
	d = input()
	list = map(int, input().split())
    for i in range(d):
        snk[list[i]] = 0
for j in range(n):
    if snk[j + 1] == -1:
        ans += 1
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
snk = [-1] * (n+1)
ans = 0
for j in range(k):
	d = int(input())
	lis = list(input().split())
	for i in range(d):
		y = int(lis[i])
		snk[y] = 0
for j in range(n):
    if snk[j+1] == -1:
        ans += 1
print(ans)
l=[int(input())for _ in range(4)]
print(min((l[0],l[1]),(l[2],l[3]))

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(min(a,b)+min(c,d))
s, w = map(int, input(),split())
if w > s:
  print("unsafe")
else:
  print("safe")

### FIXED CODE ###

s, w = map(int, input().split())
if w >= s:
  print("unsafe")
else:
  print("safe")
a,b,x = map(int,input().split())

num= range(a,b)

d =0

for c in num:
  if c%x == 0:
    d+=1
  else:
    continue

print(d)

### FIXED CODE ###

n=input().split()
print(n[0][0]+n[1][0]+n[2][0])
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N = int(input())
adj = [[] for _ in range(N)]
ed = []
nodes = [set() for _ in range(N)]
for i in range(N-1):
    a, b = map(lambda x: int(x)-1, input().split())
    adj[a].append(b)
    adj[b].append(a)
    ed.append([a, b])

col = max(len(v) for v in adj)
cand = set([v for v in range(1, col+1)])

print(col)
for a, b in ed:
    color = min(cand-nodes[a]-nodes[b])
    print(color)
    nodes[a].add(color)
    nodes[b].add(color)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N = int(input())
adj = [set() for _ in range(N)]
colors = dict()
ed = []
for i in range(N-1):
    a, b = map(lambda x: int(x)-1, input().split())
    adj[a].add(b)
    adj[b].add(a)
    ed.append([a, b])

col = max(len(v) for v in adj)

s = -1
for i, a in enumerate(adj):
    if len(a) == col:
        s = i
        break

Q = [[s, -1, -1]]
while Q:
    cur, prev, NG = Q.pop()
    c = 0
    for nex in adj[cur]:
        if nex == prev:
            continue
        else:
            c += 1
        if c == NG:
            c += 1
        colors[min(cur, nex)*N + max(cur, nex)] = c
        Q.append([nex, cur, c])
print(col)
for a, b in ed:
    print(colors[a*N + b])
ABC048B

a,b,x=map(int,raw_input().split())
res=b/x
if a!=0:
 res-=(a-1)/x
else:
 res+=1
print res


### FIXED CODE ###

#ABC048A

print 'A'+raw_input().split()[1][0]+'C'
n,t=map(int,input().split())
ct=[list(map(int,input().split())) for i in range(n)]
a=[]
for j in ct:
  if j[1]<t:
    a.append(j[0])
print(min(a))

### FIXED CODE ###

n,t=map(int,input().split())
ct=[list(map(int,input().split())) for i in range(n)]
a=[]
for j in ct:
  if j[1]<=t:
    a.append(j[0])
if len(a)==0:
  print("TLE")
else:
  print(min(a))
s=input()
x=len(s)
dp=[[0 for i in range(4)] for j in range(100005)]
for i in range(x,-1,-1):
    for j in range(3,-1,-1):
        if i==x:
            dp[i][j]=[0,1][j==3]
        else:
            dp[i][j]=dp[i+1][j]*([1,3][s[i]=="?"])
            if (j<3 and (s[i]=="?" or s[i]=="ABC"[j])):
                dp[i][j]+=dp[i+1][j+1]
            dp[i][j]%=mod
print(dp[0][0])

### FIXED CODE ###

mod=1000000007

s=input()
x=len(s)
dp=[[0 for i in range(4)] for j in range(100005)]
for i in range(x,-1,-1):
    for j in range(3,-1,-1):
        if i==x:
            dp[i][j]=[0,1][j==3]
        else:
            dp[i][j]=dp[i+1][j]*([1,3][s[i]=="?"])
            if (j<3 and (s[i]=="?" or s[i]=="ABC"[j])):
                dp[i][j]+=dp[i+1][j+1]
            dp[i][j]%=mod
print(dp[0][0])
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

n = inp()
m = int(n)

for i in range(len(n)):
    ans += (m % 10)
    m //= 10

ans %= 9

if ans == 0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

n = inp()
m = int(n)

ans = 0

for i in range(len(n)):
    ans += int(n[i])

ans %= 9

if ans == 0:
    print("Yes")
else:
    print("No")
t = [0]
x = [0]
y = [0]
N = int(input())
for i in range(N):
  ti,xi,yi = map(int,input().split())
  t.append(ti)
  x.append(xi)
  y.append(yi)
  
flg = True
 
for i in range(1,N+1):
  if t[i]-t[i-1] <　x[i]-x[i-1] + y[i]-y[i-1]:
    flg = False
  elif (t[i]-t[i-1])%2 != (x[i]-x[i-1]+y[i]-y[i-1])%2:
    flg = False
if(flg):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

t = [0]
x = [0]
y = [0]
n = int(input())
for i in range(n):
    ti, xi, yi = map(int, input().split())
    t.append(ti)
    x.append(xi)
    y.append(yi)
    
flg=True
for i in range(1, n+1):
    if((x[i]-x[i-1])+(y[i]-y[i-1])>(t[i]-t[i-1])):
        flg=False
    elif(((x[i]-x[i-1])+(y[i]-y[i-1]))%2!=(t[i]-t[i-1])%2):
        flg=False
if(flg):
    print("Yes")
else:
    print("No")