Harryxun/stf_run huggingface dataset:
n,m=map(int,input().split())
a,c=[],[]
for i in range(m):
  c.append(i+1)
i=0
while i<n:
  k,a=input().split()
  for j in range(len(c)):
    if c[j] not in a:#なかったら
      c.remove(c[j])
      j-=1
    j +=1
  a=[]
print(len(c))

### FIXED CODE ###

n, m = map(int, input().split())
a, c = [], []
for i in range(m):
    c.append(i+1)
i = 0
while i < n:
    a = list(map(int, input().split()))[1:]
    for j in range(len(c)):
        if c[j] not in a:
            c[j] = 0
    i += 1
    a = []
print(len(c)-c.count(0))
import sys
A,V = map(int(input()))
B,W = map(int(input()))
T = int(input())

#これO(1)で解けそう。

# スピードが同じ or 逃げる方のスピードが速いと無理
if V == W:
    print("NO")
    sys.exit()
elif W < V:
    print("YES")
    sys.exit()


# 鬼の方がスピードが速い場合で場合訳
distance_AB = abs(A-B)
speed_AB = abs(V-W)

if speed_AB * T < distance_AB:
    print("YES")
else:
    print("NO")




### FIXED CODE ###

import sys
A,V = map(int, input().split())
B,W = map(int, input().split())
T = int(input())

#これO(1)で解けそう。

# スピードが同じ or 逃げる方のスピードが速いと無理
if V <= W:
    print("NO")
    sys.exit()



# 鬼の方がスピードが速い場合で場合訳
distance_AB = abs(A-B)
speed_AB = abs(V-W)

if speed_AB * T >= distance_AB:
    print("YES")
else:
    print("NO")
s = str(input())
k = int(input())
max_k = min(len(s), k)
for i in range(max_k+1):
    if s[i] != "1":
        ans = s[i]
        break
    else:
        ans = 1
print(ans)

### FIXED CODE ###

s = str(input())
k = int(input())
ans = None
for i in range(k):
    if s[i] != "1":
        ans = s[i]
        break
if ans != None:
    print(ans)
else:
    print("1")
import math
n, k = map(int, input().split())

m = math.ceil(math.log2(k) - math.log2(1))

ans = 0
ans_ = 0
for i in range(1, n+1):
    if i >= k:
        ans_ += 1
    else:
        x = math.ceil(math.log2(k) - math.log2(i))
        ans += 2 ** (m - x)

a = (ans/(2**m)+ans_)/n
print(a)

### FIXED CODE ###

import math
n, k = map(int, input().split())

m = math.ceil(math.log2(k) - math.log2(1))

ans = 0
ans_ = 0
for i in range(1, n+1):
    if i >= k:
        ans_ += 1
    else:
        x = math.ceil(math.log2(k) - math.log2(i))
        ans += 2 ** (m - x)

a = (ans/(2**m)+ans_)/n
print(a)
# coding: utf-8
import itertools
n, k = map(int, raw_input().split())
ls = map(int, raw_input().split())
kls = []
for i in range(10):
    if i not in ls:
        kls.append(i)
#print ls,kls
ans_list = []
for element in itertools.product(kls, repeat=len(str(n))):
    a = int("".join(map(str,element)))
    if a >= n:
        ans_list.append(a)
print ans_list[0]

### FIXED CODE ###

# coding: utf-8
import itertools
n, k = map(int, raw_input().split())
ls = map(int, raw_input().split())
kls = []
for i in range(10):
    if i not in ls:
        kls.append(i)
#print ls,kls
ans_list = []
repeat_len = len(str(n))
while not ans_list:
    for element in itertools.product(kls, repeat=repeat_len):
        a = int("".join(map(str,element)))
        if a >= n:
            ans_list.append(a)
    repeat_len += 1
print ans_list[0]
x = int(input())
if x == 2:
    print(2)
    sys.exit()
elif x%2 == 0:
    x += 1

def get_prime(n):
    p = [2]
    for i in range(3, n, 2):
        if all(i%j!=0 for j in p):
            p.append(i)
    return p

p = get_prime(x)

while True:
    for prime in p:
        if x%prime == 0:
            break
    else:
        print(x)
        break
    x += 2


### FIXED CODE ###

x = int(input())

def get_prime(n):
    p = [2]
    for i in range(3, n, 2):
        if all(i%j!=0 for j in p):
            p.append(i)
    return p

p = get_prime(x)

if x == 2:
    print(2)
else:
    if x%2 == 0:
        x += 1
    while True:
        for prime in p:
            if x%prime == 0:
                break
        else:
            print(x)
            break
        x += 2
def main():
    import sys

    def input(): return sys.stdin.readline().rstrip()

    n = int(input())
    a = map(int, input().split())
    mod = 10**9 + 7
    a.sort()
    check = [i+1 - (i+n)%2 for i in range(n)]
    if a != check:
        print(0)
        return
    else:
        ans = pow(2, n//2, mod)
        print(ans)




if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    import sys

    def input(): return sys.stdin.readline().rstrip()

    n = int(input())
    a = list(map(int, input().split()))
    mod = 10**9 + 7
    a.sort()
    check = [i+1 - (i+n)%2 for i in range(n)]
    if a != check:
        print(0)
        return
    else:
        ans = pow(2, n//2, mod)
        print(ans)




if __name__ == '__main__':
    main()
x = int(input())

h = x // 3600
m = x % 3600 // 60
s = x  % 60

print(h,m,s,sep=':")


### FIXED CODE ###

x = int(input())

h = x // 3600
m = x % 3600 // 60
s = x  % 60

print(h,m,s,sep=':')
from copy import*
from collections import*
from numpy import*
from itertools import*
a,b=map(int,input().split())
*c,=map(int,input().split())
c1=deepcopy(c)
c2=deepcopy(c)

for i in range(1,a):
    c1[i]=min(c1[i-1],c1[i])
for i in range(a-1,0,-1):
    c2[i-1]=max(c2[i],c2[i-1])

#print(c1,c2)
d=array([k for k,v in groupby(c2)])-array([k for k,v in groupby(c1)])
#print(d)
print(list(d).count(max(d)))

### FIXED CODE ###

from copy import*
from numpy import*
a,b=map(int,input().split())
*c,=map(int,input().split())
c1=deepcopy(c)
c2=deepcopy(c)

for i in range(1,a):
    c1[i]=min(c1[i-1],c1[i])
for i in range(a-1,0,-1):
    c2[i-1]=max(c2[i],c2[i-1])

#print(c1,c2)
d=array(c2)-array(c1)
d2=array(c)-array(c1)
print(list(d2).count(max(d)))
import math

n = int(input())

k = math.floor(math.sqrt(n))

for i in reversed(range(k)):
  if n/i == n//i:
    print(int(n/i + i -2))
    exit()
    

### FIXED CODE ###

import math

n = int(input())

k = math.ceil(math.sqrt(n))

for i in reversed(range(k+1)):
  if n/i == n//i:
    print(int(n/i + i -2))
    exit()
print(int(not(input()))

### FIXED CODE ###

x = int(input())
print(1) if x == 0 else print(0)
import numpy as np
N = int(input())
A = list(map(int,input().split()))
ans = np.argsort(A)+1
for a in ans:
    sys.stdout.write(str(a))
    sys.stdout.write(" ")


### FIXED CODE ###

import numpy as np
import sys
N = int(input())
A = list(map(int,input().split()))
ans = np.argsort(A)+1
for a in ans:
    sys.stdout.write(str(a))
    sys.stdout.write(" ")
total, tar = list(map(int, input().split()))
dice_array = list(map(int, input().split()))

dice_total = [0]

for i in range(total):
  dice_total.append(dice_array[i] + dice_total[i])

ans = dice_total[tar]
tar_num = tar
for i in range(total - tar):
  tmp = dice_total[i + 1 + tar] - dice_total[i + 1]
  if ans < tmp:
    ans = tmp
    tar_num = i + 1

sum_data = 0
cnt = 0
for x in range(tar_num, tar + tar_num):
  cnt = sum(list(range(1, dice_array[x] + 1)))
  sum_data += (cnt / dice_array[x])
  
print(sum_data)


### FIXED CODE ###

total, tar = list(map(int, input().split()))
dice_array = list(map(int, input().split()))

hope_array = [0.0] * total
for i in range(total):
   hope_array[i] = (dice_array[i] * (dice_array[i] + 1)) / 2 / dice_array[i]

dice_total = [0]
 
for i in range(total):
  dice_total.append(hope_array[i] + dice_total[i])
 
ans = dice_total[tar]
tar_num = tar
for i in range(total - tar):
  tmp = dice_total[i + 1 + tar] - dice_total[i + 1]
  if ans < tmp:
    ans = tmp

print(ans)
a,b,c = input().split()
if b == '+':
    print(a+c)
else:
    print(a-c)

### FIXED CODE ###

a,b,c = input().split()
if b == '+':
    print(int(a)+int(c))
else:
    print(int(a)-int(c))
a=input()
for i in RANGE(3):
  if a[i]=='1':
    a[i]='9'
  elif a[i]=='9':
    a[i]=='1'
print(a)


### FIXED CODE ###

a=list(input())
for i in range(3):
  if a[i]=='1':
    a[i]='9'
  elif a[i]=='9':
    a[i]='1'
print(a[0]+a[1]+a[2])
import sys

def insert(S, k):
    S.append(k)
    idx = len(S) - 1
    while True:
        p = (i + 1) / 2 - 1
        if p < 0 or S[idx] <= S[p]:
            break
        else:
            S[idx], S[p] = S[p], S[idx]
            idx = p

def maxHeapify(A, i, size):
    l = 2 * i + 1
    r = 2 * i + 2

    if l < size and A[l] > A[i]:
        largest = l
    else:
        largest = i

    if r < size and A[r] > A[largest]:
        largest = r

    if largest != i:
        A[i], A[largest] = A[largest], A[i]
        maxHeapify(A, largest, size)

def extract(S):
    print S[0]
    S[0] = S[-1]
    S.pop()
    maxHeapify(S, 0, len(S))

if __name__ == "__main__":
    lines = sys.stdin.readlines()
    lines.pop()

    S = []
    for line in lines:
        if line[0] == "i":
            insert(S, int(line[7:]))
        else:
            extract(S)

### FIXED CODE ###

import sys

def insert(k):
    global S, last
    S[last] = k
    idx = last
    while True:
        p = (idx + 1) / 2 - 1
        if S[idx] <= S[p]:
            break
        else:
            S[idx], S[p] = S[p], S[idx]
            idx = p
    last += 1

def maxHeapify(i):
    global S, last
    l = 2 * i + 1
    r = 2 * i + 2

    if l < last and S[l] > S[i]:
        largest = l
    else:
        largest = i

    if r < last and S[r] > S[largest]:
        largest = r

    if largest != i:
        S[i], S[largest] = S[largest], S[i]
        maxHeapify(largest)

def extract():
    global S, last
    print S[0]
    last -= 1
    S[0], S[last] = S[last], 0
    maxHeapify(0)

lines = sys.stdin.readlines()
lines.pop()

S = [0] * 2000001
S[2000000] = 2000000000
last = 0
for line in lines:
    if line[0] == "i":
        insert(int(line[7:]))
    else:
        extract()
import itertools
NK = input().split()
N = NK[0]
K = int(NK[1])
 
d = input().split()
D = [int[s] for s in d]
 
Da = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
 
for i in range(len(D)):
    Da.remove(D[i])
Da_str = [str(j) for j in Da]
 
a_1 = [''.join(j) for j in itertools.product(b_st, repeat=len(N))]
a_2 = [''.join(j) for j in itertools.product(b_st, repeat=len(N)+1)]
a = a_1 + a_2
nu = [int(k) for k in a]
 
 
for i in nu:
    if i >= int(N):
        print(i)
        break

### FIXED CODE ###

import itertools
NK = input().split()
N = NK[0]
K = int(NK[1])
 
d = input().split()
D = [int(s) for s in d]
 
Da = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
 
for i in D:
    Da.remove(i)
Da_str = [str(j) for j in Da]
 
a_1 = [''.join(j) for j in itertools.product(Da_str, repeat=len(N))]
a_2 = [''.join(j) for j in itertools.product(Da_str, repeat=len(N)+1)]
a = a_1 + a_2
nu = [int(k) for k in a]
 
for i in nu:
    if i >= int(N):
        print(i)
        break
N = int(input())
H = list(map(int,input().split()))

for i in range(N-1):
	if H[i] < H[i+1]:
        pass
    else:
        H[i] = H[i]-1


count = 0
for k in range(N-1):
    if H[k] <= H[k + 1]:
        count = count + 1
    else:
        count = -1
        break

if 0 <= count <= N:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

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

for i in range(1, N):
    H[i] = H[i] - 1
    if H[i] < H[i-1]:
        H[i] = H[i] + 1
    else:
        pass


count = 0
for k in range(N-1):
    if H[k] <= H[k + 1]:
        count = count + 1
    else:
        count = -1
        break

if 0 <= count <= N:
    print("Yes")
else:
    print("No")
s = []
for i in range(5):
  s.append(int(input()))
k = int(input())
if max(s) - min(s) =< k:
  print("Yay!")
else:
  print(":(")

### FIXED CODE ###

s = []
for i in range(5):
  s.append(int(input()))
k = int(input())
if max(s) - min(s) > k:
  print(":(")
else:
  print("Yay!")
import bisect


x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

ans_p = sorted(p, reverse=True)[:x][::-1]
ans_q = sorted(q, reverse=True)[:y][::-1]
r.sort(reverse=True)

p_index = 0
q_index = 0
used_r_sum = 0

for max_r in r:
    if ans_p[p_index] < ans_q[q_index]:
        if ans_p[p_index] < max_r:
            p_index += 1
            used_r_sum += max_r
        else:
            break
    else:
        if ans_q[q_index] < max_r:
            q_index += 1
            used_r_sum += max_r
        else:
            break


print(sum(ans_p[p_index:])+sum(ans_q[q_index:])+used_r_sum)

### FIXED CODE ###

x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

ans_p = sorted(p, reverse=True)[:x][::-1]
ans_q = sorted(q, reverse=True)[:y][::-1]
r.sort(reverse=True)

p_index = 0
q_index = 0
used_r_sum = 0

for max_r in r:
    ans_p_p_index = ans_p[p_index] if p_index < x else float('inf')
    ans_q_q_index = ans_q[q_index] if q_index < y else float('inf')
    if ans_p_p_index < ans_q_q_index:
        if ans_p_p_index < max_r:
            p_index += 1
            used_r_sum += max_r
        else:
            break
    else:
        if ans_q_q_index < max_r:
            q_index += 1
            used_r_sum += max_r
        else:
            break


print(sum(ans_p[p_index:])+sum(ans_q[q_index:])+used_r_sum)
# coding: utf-8
# Your code here!
import itertools
import pandas as pd

k, s = map(int, input().split())

lst = [i for i in range(k)]

prod = itertools.product(lst, repeat=3)

frame = pd.DataFrame(list(prod))

frame['ans'] = frame[0]+frame[1]+frame[2]

s_bool = (frame['ans'] ==s)

ans = s_bool.sum()

print(ans)











### FIXED CODE ###

# coding: utf-8
# Your code here!

k, s = map(int, input().split())

cnt = 0

for i in range(k+1):
    for j in range(k+1):
        if s-i-j <= k and s-i-j>=0:
            cnt += 1

print(cnt)
# coding: utf-8
a=input()
b=input()
m=int(a)+int(b)
if m<10:
  print(int(m))
else:
  print("error")

### FIXED CODE ###

# coding: utf-8
a,b=input().split()
m=int(a)+int(b)
if m<10:
  print(int(m))
else:
  print("error")
n,m = map(int,input().split())

lmin = 1
rmax = n
for _ in range(m):
    l,r = map(int,input().split())
    if l > lmin:
        lmin = l
    if rmax > r:
        rmax = r
    
print(max(rmax - lmin + 1), 0)
    

### FIXED CODE ###

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

lmin = 1
rmax = n
for _ in range(m):
    l,r = map(int,input().split())
    if l > lmin:
        lmin = l
    if rmax > r:
        rmax = r
    
print(max(rmax - lmin + 1, 0))
import sys

stdin = sys.stdin

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

def change(a, x, y, h, w):
    ct = 0
    if x > 0:
        if a[x - 1][y] == '.':
            a[x - 1][y] = '#'
            ct += 1
    if y > 0:
        if a[x][y - 1] == '.':
            a[x][y - 1] = '#'
            ct += 1
    if x < w - 1:
        if a[x + 1][y] == '.':
            a[x + 1][y] = '#'
            ct += 1
    if y < h - 1:
        if a[x][y + 1] == '.':
            a[x][y + 1] = '#'
            ct += 1
    return ct


h, w = na()
a = [list(input()) for i in range(h)]
ct = 0
ds = h * w
trial = 0
for y in range(h):
    for x in range(w):
        if a[x][y] == '#':
            ct += 1

while ct != ds:
    li = []
    for y in range(h):
        for x in range(w):
            if a[x][y] == '#':
                li.append([x, y])
    for p in li:
        ct += change(a, p[0], p[1], h, w)
    trial += 1

print(trial)



### FIXED CODE ###

import sys
import copy
import  math
import bisect
from collections import *
from operator import itemgetter
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

h, w = na()
maze = [list(input()) for _ in range(h)]
que = deque()
d = [[-1] * w for i in range(h)]
for i in range(h):
    for j in range(w):
        if maze[i][j] == "#":
            d[i][j] = 0
            que.append((i, j))
l = 0

while que:
    x, y = que.popleft()
    l = d[x][y]
    for dx, dy in ((1, 0), (0, 1), (-1, 0), (0, -1)):
        nx = x + dx
        ny = y + dy
        if not 0 <= nx < h or not 0 <= ny < w or d[nx][ny] != -1:
            continue
        d[nx][ny] = l + 1
        que.append((nx, ny))
print(l)
n, m = map(int, input().split())
a = []
for i in range(n):
    a.append(list(map(int, input().split())))
l = [0] * n
for i in range(m):
    for j in range(n):
        if i + 1 in a[j][1:]:
            l[i] += 1
count = 0
print(l)
for i in range(n):
    if l[i] == n:
        count += 1
print(count)

### FIXED CODE ###

n, m = map(int, input().split())
a = []
for i in range(n):
    a.append(list(map(int, input().split())))
l = [0] * m
for i in range(n):
    for j in range(m):
        if j + 1 in a[i][1:]:
            l[j] += 1
count = 0
for i in range(m):
    if l[i] == n:
        count += 1
print(count)
n, k = map(int, input().split())
A = list(map(int, input().split()))
def f(x):
    return A[x-1]
c = 1, P = [1]

for i in range(k):
    c = f(c)
    P.append(c)
    if c in P:
        roop_start = P.find(c)
        roop_num  = i + 1-  roop_start
        break
a = (k - roop_start) % roop_num
for i in range(a):
    roop_start = f(roop_start)
print(roop_start)

### FIXED CODE ###

n, k = map(int, input().split())
A = list(map(int, input().split()))
now = 1
 
for i in range(len(bin(k))-2):
    if (k>>i)&1:
        now = A[now-1]
    A = [A[a-1] for a in A]
print(now)
import math
a=int(input())
print(math.factrial(a)%(10*9+7))

### FIXED CODE ###

import math
a=int(input())
print(math.factorial(a)%(10**9+7))
import collections
a=int(input())
b=list(map(int,input().split()))
c=[0]*a
d=collections.Counter(b)
n,m=zip(*d.most_common())
n=list(n)
m=list(m)
for i in n:
    c[i-1]=m[i-1]
print(c)
for i in c:
    print(i)


### FIXED CODE ###

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

c=collections.Counter(b)
n,m=zip(*c.most_common())
n,m=list(n),list(m)
o=c.most_common()

result=[0]*a
for i in range(len(o)):
    result[o[i][0]-1]=o[i][1]

for i in result:
    print(i)
import sys

args = sys.argv
x = int(sys.argv[1])
y = int(sys.argv[2])
if x<10 and y<10:
	print(x*y)
else:
	print('-1')

### FIXED CODE ###

import sys
 
input = sys.stdin.readline().split()
result = 1
for n in input:
  n=int(n)
  if result==-1:
    break
  if n<10:
    result = result * n
  else:
    result=-1
print(result)
n=int(input())

#n=m*a+a
#n=(m+1)*a
#m>a

cnt=0
for i in range(1,int(n**(0.5))+1):
    if n%i==0:
        m=n//i-1
        if n%m==n//m:
            cnt+=m
print(cnt)
        
    


### FIXED CODE ###

n=int(input())

#n=m*a+a
#n=(m+1)*a
#m>a

if n==1 or n==2:
    print(0)
    exit()

cnt=0
for i in range(1,int(n**(0.5))+1):
    if n%i==0:
        m=n//i-1
        if n%m==n//m:
            cnt+=m
print(cnt)
a,b,x=map(int,input().split())
if a>c or a+b<x:
  print("No")
else:
  print("Yes")


### FIXED CODE ###

a,b,x=map(int,input().split())
if a<=x<=a+b:
	print("YES")
else:
	print("NO")
X={int(input()),int(input()),int(input())}
if X in [{5,5,7},{5,7,5},{7,5,5}]:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

X=input()
if X in ["5 5 7","5 7 5","7 5 5"]:
    print("YES")
else:
    print("NO")
vimport sys
input = sys.stdin.readline
sys.setrecursionlimit(10**5)

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

def dfs(v, o):
    for c in G[v]:
        if c == o:
            return [v]
    for c in G[v]:
        ret = dfs(c, o)
        if ret:
            return [v] + ret

for v in range(1, N+1):
    cur = dfs(v, v)
    if cur:
        break
else:
    print(-1)
    exit()

while True:
    cur_set = set(cur)
    unused = None
    for i in range(len(cur)):
        u, v = cur[i], cur[(i+1) % len(cur)]
        for c in G[u]:
            if c == v:
                continue
            elif c in cur_set:
                unused = (i, cur.index(c))
                break

    if not unused:
        break
    else:
        t, s = unused
        nxt = []
        i = s
        while i != t:
            nxt.append(cur[i])
            i = (i + 1) % len(cur)
        nxt.append(cur[t])
        cur = nxt
print(len(cur))
print(*cur, sep='\n')

### FIXED CODE ###

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

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

def dfs(v, o):
    for c in G[v]:
        if c == o:
            return [v]
    for c in G[v]:
        if visited[c]:
            continue
        visited[c] = True
        ret = dfs(c, o)
        if ret:
            return [v] + ret

for v in range(1, N+1):
    visited = [False] * (N+1)
    cur = dfs(v, v)
    if cur:
        break
else:
    print(-1)
    exit()

while True:
    cur_set = set(cur)
    unused = None
    for i in range(len(cur)):
        u, v = cur[i], cur[(i+1) % len(cur)]
        for c in G[u]:
            if c == v:
                continue
            elif c in cur_set:
                unused = (i, cur.index(c))
                break

    if not unused:
        break
    else:
        t, s = unused
        nxt = []
        i = s
        while i != t:
            nxt.append(cur[i])
            i = (i + 1) % len(cur)
        nxt.append(cur[t])
        cur = nxt

print(len(cur))
print(*cur, sep='\n')
a,b,c = map(int,input().split())

if a != b != c:
    print(3)
if a == b and a != c and b != c: 
    print(2)
if b == c and b != a and c != a:
    print(2)
iif a == c and a != b and c != b:
    print(2)
if a == b == c:
    print(1)

### FIXED CODE ###

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

if a != b != c and a != c:
    print(3)
if a == b and a != c and b != c: 
    print(2)
if b == c and b != a and c != a:
    print(2)
if a == c and a != b and c != b:
    print(2)
if a == b == c:
    print(1)
a,b=map(int,input().split())
s=0
for i in range(1,42):
    if (b//2**i)*(2**(i-1))+(b%(2*i-1))-(((a-1)//2**i)*(2**(i-1))+((a-1)%(2*i-1))%2!=0
        s+=2**(i-1)
print(s)


### FIXED CODE ###

a,b=map(int,input().split())
a+=1
b+=1
s=0
for i in range(1,42):
    k=b-(b//(2**i))*(2**i)
    if k>=2**(i-1):
        x=(b//(2**i))*(2**(i-1))+(k%(2**(i-1)))
    else:
        x=(b//(2**i))*(2**(i-1))
    j=(a-1)-((a-1)//(2**i))*(2**i)
    if j>=2**(i-1):
        y=((a-1)//(2**i))*(2**(i-1))+(j%(2**(i-1)))
    else:
        y=((a-1)//(2**i))*(2**(i-1))
    if x!=0 and (x-y)%2!=0:
        s+=2**(i-1)
print(s)
k = int,input()
l = input()
if(len(l)<k):
    print(l)
else:
    print(l)
    print("...")

### FIXED CODE ###


k=int(input())
s=input()
l=len(s)
if l<=k:
    print(s)
else:
    print(s[:k]+"...")
def lcs_size():
  X = input()
  Y = input()
  
  a = len(X)
  b = len(Y)
  
  for i in range(a):
    for j in range(b):
      c[i][j] = 0
      if X[i] == Y[j]:
        c[i][j] = c[i-1][j-1] + 1
      else:
        c[i][j] = max(c[i-1][j], c[i][j-1])
      maxl = max(maxl, c[i][j])
  
  return maxl

q = input()

for i in range(q):
  print lcs_siz()

### FIXED CODE ###

def lcs_size():
  X = raw_input()
  Y = raw_input()
  a = len(X)
  b = len(Y)
  z2 = [0 for i in range(b+1)]

  for i in range(a):
    ch = X[i]
    z1 = z2 + []
    for j in range(b):
      if ch == Y[j]:
        z2[j+1] = z1[j] + 1
      elif z2[j+1] < z2[j]:
        z2[j+1] = z2[j]

  return z2[-1]

q = input()
for k in range(q):
  print lcs_size()
def readLine_str_list():return list(map(str, stdin.readline().split(',')))
def main():
    s = readLine_str_list()
    print(' '.join(s))

if __name__ == "__main__":
    main()

### FIXED CODE ###

from sys import stdin, stdout
def readLine_str_list():return list(map(str, stdin.readline().split(',')))
def main():
    s = readLine_str_list()
    print(' '.join(s))

if __name__ == "__main__":
    main()