Harryxun/stf_run huggingface dataset:
n = int(input())
listForList=[]

index=0
while index < n:
    listI = list(input())
    listI.sort()
    listForList.append(listI)
    index+=1

if len(listForList)==1:
    print("".join(listForList[0]))
else:
    index2=0
    pendingL=[]
    while index2 < len(listForList)-1:
        if index2 ==0:
            for c in listForList[index2]:
                if c in listForList[index2+1]:
                    pendingL.append(c)
        else:
            newPL=[]
            for ch in pendingL:
                if ch in listForList[index2+1]:
                    newPL.append(ch)
            pendingL = newPL
            if pendingL==[]:
                print("")
                break
        index2+=1

if index2 == len(listForList)-1:
    print("".join(pendingL))
        

### FIXED CODE ###


n = int(input())
listForList = []

index = 0
while index < n:
    listI = list(input())
    listI.sort()
    listForList.append(listI)
    index += 1

if len(listForList) == 1:
    print("".join(listForList[0]))
else:
    index2 = 0
    pendingL = []
    while index2 < len(listForList)-1:
        if index2 == 0:
            for c in listForList[index2]:
                if c in listForList[index2+1]:
                    pendingL.append(c)
        else:
            newPL = []
            for ch in pendingL:
                if ch in listForList[index2+1]:
                    newPL.append(ch)
                    listForList[index2+1].remove(ch)
            pendingL = newPL
            if pendingL == []:
                print("")
                break
        index2 += 1

    if index2 == len(listForList)-1:
        print("".join(pendingL))
a,b,c,d=map(int,input().split())
print(min(a,b)+min(c,d))

### FIXED CODE ###

print(min(int(input()),int(input()))+min(int(input()),int(input())))
def ans():
    n = int(input())
    a = list(map(int, input().split()))

    def comb(x, y):
        c = 1
        p = 1
        for i in range(y, 0, -1):
            c = c * i
        for i in range(x, x - y, -1):
            p = p * i
        return p / c

    p = max(a)
    want_near = p // 2
    tmp = 1
    tmpdiff = 9999999
    for i in a:
        diff = abs(i - want_near)
        if diff < tmpdiff:
            tmpdiff = diff
            tmp = i

    return "{0} {1}".format(p, tmp)


print(m())


### FIXED CODE ###

def someone_ans():
    n = int(input())
    a = list(map(int, input().split()))
    a.sort()
    x_max = a[n - 1]
    center = a[0]
    for i in range(1, n - 1):
        if abs(center - x_max / 2) > abs(a[i] - x_max / 2):
            center = a[i]
    return "{0} {1}".format(x_max, center)


print(someone_ans())
N=int(input())

if N%==0:
  print(N)
else:
  print(2*N)

### FIXED CODE ###

N=int(input())

if N%2==0:
  print(N)
else:
  print(2*N)
import sys
input=sys.stdin.readline
def main():
  n,m=map(int,input().split())
  p=list(map(int,input().split()))
  xy=[list(map(int,input().split())) for i in range(n)]
  class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)
  uf=UnionFind(n)
  for i in range(m):
    uf.union(p[xy[i][0]-1]-1,p[xy[i][1]-1]-1)
  ans=0
  for i in range(n):
    if uf.same(i,p[i]-1):
      ans+=1
  print(ans)
if __name__=='__main__':
  main()

### FIXED CODE ###

import sys
input=sys.stdin.readline
def main():
  n,m=map(int,input().split())
  p=list(map(int,input().split()))
  xy=[list(map(int,input().split())) for i in range(m)]
  class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)
  uf=UnionFind(n)
  for i in range(m):
    uf.union(p[xy[i][0]-1]-1,p[xy[i][1]-1]-1)
  ans=0
  for i in range(n):
    if uf.same(i,p[i]-1):
      ans+=1
  print(ans)
if __name__=='__main__':
  main()
A = [int(i) for i in input().split()]

print(A(max)-A(min))

### FIXED CODE ###

A = [int(i) for i in input().split()]

ans = 0

A.sort()

for i in range(len(A)-1):
    ans += A[i+1] - A[i]

print(ans)
def main():
    N = int(input())

    i = 1
    sum = 0
    temp = 0
    while True:
        temp = 0
        i += 1
        sum += 1
        for j in range(1,i):
            temp += 26**j

        if N <= temp:
            break

    # 文字数はsum
    #for j in range(1,sum):
        #temp += 26**j
    #N -= temp

    ans = []
    flag = 0
    cnt = 0
    for j in range(sum):
        amari = N%26
        if amari == 0:
            flag = 1
            cnt += 1
            if cnt == 1:
                #print(amari,flag)
                ans.append(amari)
                N = N//26
                continue
        N = N//26
        #print(amari,flag)
        ans.append(amari-flag)

    #print(ans)

    ans2 = [0]*len(ans)
    dict = {1:'a',2:'b',3:'c',4:'d',5:'e',6:'f',7:'g',8:'h',9:'i',10:'j',11:'k',12:'l',13:'m',14:'n',15:'o',16:'p',17:'q',18:'r',19:'s',20:'t',21:'u',22:'v',23:'w',24:'x',25:'y',0:'z'}
    for j in range(sum):
        ans2[sum-1-j] = dict[ans[j]]
    print(''.join(ans2))


main()


### FIXED CODE ###

def main():
    N = int(input())

    i = 1
    sum = 0
    temp = 0
    while True:
        temp = 0
        i += 1
        sum += 1
        for j in range(1,i):
            temp += 26**j

        if N <= temp:
            break

    #文字数はsum
    temp = 0
    for j in range(1,sum):
        temp += 26**j
    #print(N)
    N -= (temp+1)
    #print(N,sum)

    ans = []
    for j in range(sum):
        amari = N%26
        N = N//26
        #print(amari,flag)
        ans.append(amari)

    ans2 = [0]*len(ans)
    dict = {0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k',11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s',19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
    for j in range(sum):
        ans2[sum-1-j] = dict[ans[j]]
    print(''.join(ans2))


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

candidates = [0] * n
friends = [set() for _ in range(n)]
blocks = [set() for _ in range(n)]
parent = [i for i in range(n)]
sizes = [1 for i in range(n)]

def root(x):
    if parent[x] == x:
        return x
    else:
        parent[x] = root(parent[x])
        return parent[x]

def unite(x, y):
    x = root(x)
    y = root(y)
    if x == y:
        return
    parent[x] = y
    sizes[x] = sizes[x] + sizes[y]
    sizes[y] = sizes[x]

def same(x, y):
    x = root(x)
    y = root(y)
    return x == y

for _ in range(m):
    a, b = map(int, input().split())
    friends[a - 1].add(b - 1)
    friends[b - 1].add(a - 1)
    unite(a - 1, b - 1)

for _ in range(k):
    c, d = map(int, input().split())
    if same(c - 1, d - 1):
        blocks[c - 1].add(d - 1)
        blocks[d - 1].add(c - 1)

for i in range(n):
    x = root(i)
    s = sizes[x]
    candidates[i] = s - len(friends[i]) - len(blocks[i]) - 1

print(*candidates)


### FIXED CODE ###

class UnionFind:
    def __init__(self, n):
        self.parents = [i for i in range(n + 1)]
        self.sizes = [1] * (n + 1)

    def find(self, x):
        if self.parents[x] == x:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if y < x:
            x, y = y, x
        self.parents[y] = x
        self.sizes[x] += self.sizes[y]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def size(self, x):
        return self.sizes[self.find(x)]


n, m, k = map(int, input().split())
uf = UnionFind(n)
friends = [0] * n
blocks = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    friends[a - 1] += 1
    friends[b - 1] += 1
    uf.unite(a - 1, b - 1)
for i in range(k):
    c, d = map(int, input().split())
    if uf.same(c - 1, d - 1):
        blocks[c - 1] += 1
        blocks[d - 1] += 1
ans = [0] * n
for i in range(n):
    ans[i] = uf.size(i) - friends[i] - blocks[i] - 1
print(*ans)
import math
from itertools import permutations 
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
ans_ = 0
count = 0
for x, y, z in permutations(range(N), N):
    x1, y1 = xy[x]
    x2, y2 = xy[y]
    x3, y3 = xy[z]
    ans_ += math.sqrt((x1-x2)**2+(y1-y2)**2)+math.sqrt((x3-x2)**2+(y3-y2)**2)
    count += 1
print(ans_ / count)

### FIXED CODE ###

import itertools
N = int(input())
xy_list = [list(map(int, input().split())) for _ in range(N)]

ans = 0
num = 0
for xy in itertools.permutations(xy_list):
    ans_pre = 0
    for i in range(N-1):
        ans_pre += ((xy[i][0]-xy[i+1][0])**2 + (xy[i][1]-xy[i+1][1])**2)**(0.5)
    num += 1
    ans += ans_pre
print(ans/num)
s=input()
list=[]
k=int(input())
for i in range(len(s)-1):
    if (ord(s[i])+k)>122:
        list.append('a')
        k=k-(123-ord(s[i]))
    else:
        list.append(s[i])
list.append(chr(ord(s[len(s)])+k))
for i in range(len(s)):
    print(list[i], end='')

### FIXED CODE ###

s = input()
print (s[0:4], end=' ')
print(s[4:12])
a, b =  [ v for v in input().split() ]

c = int(a+b)

if int(math.sqrt(c))**2 == c:
	print("Yes")
else:
	print("No")

### FIXED CODE ###


a, b =  [ v for v in input().split() ]

c = int(a+b)

if int(c**0.5)**2 == c:
	print("Yes")
else:
	print("No")
n = int(input())
a = int(input())
b = int(input())
if n==1: print('Hello World')
else: print(a+b)

### FIXED CODE ###

n = int(input())
if n==1:
  print('Hello World')
else:
  a = int(input())
  b = int(input())
  print(a+b)
import itertools

N=int(input())
P=list(map(int,input().split()))
Q=list(map(int,input().split()))


Ns=list(itertools.permutations(range(1,N+1)))
PO=Ns.index(P)
QO=Ns.index(Q)
print(abs(PO-QO))


### FIXED CODE ###

import itertools

N=int(input())
p=list(map(str,input().split()))
q=list(map(str,input().split()))
P=''.join(p)
Q=''.join(q)

ns=list(itertools.permutations(range(1,N+1)))
Ns=[]
for i in range(len(ns)):
    temparr=[]
    for j in range(N):
        a=ns[i][j]
        temparr.append(str(a))
    b=''.join(temparr)
    Ns.append(b)

PO=Ns.index(P)
QO=Ns.index(Q)
print(abs(PO-QO))
def main():
    n,a,b,c,d = map(int,input().split()) 
    s=list(input())
    for i in range(max(c,d)-a-1):
        if s[a+i-1]=="#" and s[a+i]=="#":
            print("No")
            return
    if c<d:
        print("Yes")
        return
    else:
        for i in range(c-b-2):
            if s[b+i]==s[b+i+1] and s[b+i]==".":
                print("Yes")
                return
        if s[b]=="." and s[b-2]==".":
            print("Yes")
            return
        if s[d]=="." and s[d+2]==".":
            print("Yes")
            return
        print("No")
main()

### FIXED CODE ###

def main():
    n,a,b,c,d = map(int,input().split()) 
    s=list(input())
    for i in range(max(c,d)-a-1):
        if s[a+i-1]=="#" and s[a+i]=="#":
            print("No")
            return
    if c<d:
        print("Yes")
        return
    else:
        for i in range(d-b+1):
            if s[b+i-2]==s[b+i-1] and s[b+i-1] == s[b+i] and s[b+i]==".":
                print("Yes")
                return
        print("No")
main()
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

#define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};}
//pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ

#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define SWAP(type, x, y) do { type tmp = x; x = y; y = tmp; } while (0)

#define MOD 1000000007 

int main(void){
    int c[3][3];
    for(int i=0;i<3;i++){
        for(int j=0;j<3;j++) scanf("%d",&c[i][j]);
    }

    int a[3]={0,c[1][0]-c[0][0],c[2][0]-c[0][0]};
    int b[3]={c[0][0],c[0][1],c[0][2]};

    if(c[1][1]!=a[1]+b[1]){
        printf("No\n");
        return 0;
    }
    if(c[1][2]!=a[1]+b[2]){
        printf("No\n");
        return 0;
    }
    if(c[2][1]!=a[2]+b[1]){
        printf("No\n");
        return 0;
    }
    if(c[2][2]!=a[2]+b[2]){
        printf("No\n");
        return 0;
    }
    printf("Yes\n");

    return 0;
}

### FIXED CODE ###

#coding: utf-8
import math
import heapq
import bisect
import numpy as np
from collections import Counter
#from scipy.misc import comb

C = [list(map(int, input().split())) for i in range(3)]
A = [0]*3
B = [0]*3

flg = 0
for i in range(C[0][0]+1):
    A[0] = i
    B[0] = C[0][0]-i
    for j in range(1,3):
        A[j] = C[j][0]-B[0]
        B[j] = C[0][j]-A[0]
    
    tmp = abs(C[1][1]-A[1]-B[1])+abs(C[1][2]-A[1]-B[2])+abs(C[2][1]-A[2]-B[1])+abs(C[2][2]-A[2]-B[2])
    if tmp==0:
        flg = 1

if flg:
    print("Yes")
else:
    print("No")
x = input().split()
n = int(x[0])
m = x[1:len(x)]
k = 0
for i in range(0,n):
    a = int(m[i])
    for j in range(0,i):
        if int(m[i]) > int(m[j]):
            a = int(m[j])
    if a == int(m[i]):
        k += 1
print(k)

### FIXED CODE ###

n = int(input())
m = list(map(int, input().split()))
l = 0
s = m[0]
for i in range(0,n):
    if s >= m[i]:
        s = m[i]
        l += 1
print(l)
import heapq
from collections import defaultdict

nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()


N = n()
M = 0
ds = [None] * N

edges = defaultdict(set)
ranks = [0] * N
for i in range(N-1):
    a, b = nl()
    edges[a-1].add(b-1)
    edges[b-1].add(a-1)
    ranks[a-1] += 1
    ranks[b-1] += 1
cs = sorted(nl())
M = sum(cs[:-1])

h = []
for i in range(N):
    heapq.heappush(h, (ranks[i], i))

for i in range(N):
    rank, node = heapq.heappop(h)
    ds[node] = cs[i]
    for next_node in edges[node]:
        heapq.heappush(h, (ranks[next_node]-1, next_node))
        edges[next_node].remove(node)

print(M)
print(' '.join([str(d) for d in ds]))


### FIXED CODE ###

import heapq
from collections import defaultdict

nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()


N = n()
M = 0
ds = [None] * N

edges = defaultdict(set)
ranks = [0] * N
for i in range(N-1):
    a, b = nl()
    edges[a-1].add(b-1)
    edges[b-1].add(a-1)
    ranks[a-1] += 1
    ranks[b-1] += 1
cs = sorted(nl())
M = sum(cs[:-1])

h = []
for i in range(N):
    heapq.heappush(h, (ranks[i], i))

for i in range(N):
    rank, node = heapq.heappop(h)
    ds[node] = cs[i]
    for next_node in edges[node]:
        ranks[next_node] -= 1
        heapq.heappush(h, (ranks[next_node], next_node))
        edges[next_node].remove(node)

print(M)
print(' '.join([str(d) for d in ds]))
N=int(input())
n=N[-1]
if n==3:
  ans='bon'
elif n==0 and n==1 and n==6 and n==8:
  ans='pon'
else:
  ans='hon'
print(ans)

### FIXED CODE ###

N=input()
n=N[-1]
if n=='3':
  ans='bon'
elif n=='0' or n=='1' or n=='6' or n=='8':
  ans='pon'
else:
  ans='hon'
print(ans)
import gcd from fractions

def lcm(a,b):
    return a//gcd(a)*b
mod=10**9+7
n=int(input())
a=[int(i) for i in input().split()]
l=a[0]
for i in range(1,n):
    l=lcm(l,a[i])
ans=0
for i in range(n):
    ans+=l//a[i]
    ans%=mod
print(ans)


### FIXED CODE ###

from fractions import gcd

def lcm(c,d):
    return c//gcd(c,d)*d
mod=10**9+7
n=int(input())
a=[int(i) for i in input().split()]
l=a[0]
for i in range(1,n):
    l=lcm(l,a[i])
ans=0
for i in range(n):
    ans+=l//a[i]
    #ans%=mod
print(ans%mod)
N,K=map(int,input().split())
Tree=[[] for i in range(N)]
MOD=10**9+7
for i in range(N-1):
  a,b=map(int,input().split())
  Tree[a-1].append(b-1)
  Tree[b-1].append(a-1)
def P(n,m):
  _=n
  for i in range(m-1):
    n-=1
    _*=(n%MOD)
  return _%MOD
def dfs(p,i):
  global Tree,ans
  n=len(Tree[i])-1
  if n==0:
    return
  if i==0:
    ans*=P(K-1,n)
  else:
    ans*=P(K-2,n)
  for j in Tree[i]:
    if j==p:
      continue
    dfs(i,j)
Tree[0].append(-1)
ans=K
dfs(-1,0)
print(ans%MOD)

### FIXED CODE ###

N,K=map(int,input().split())
Tree=[[] for i in range(N)]
MOD=10**9+7
import sys
sys.setrecursionlimit(10**9)
for i in range(N-1):
  a,b=map(int,input().split())
  Tree[a-1].append(b-1)
  Tree[b-1].append(a-1)
def P(n,m):
  _=n
  for i in range(m-1):
    n-=1
    _*=n
    _%=MOD
  return _%MOD
def dfs(p,i):
  global Tree,ans
  n=len(Tree[i])-1
  if n==0:
    return
  if i==0:
    ans*=P(K-1,n)
  else:
    ans*=P(K-2,n)
    ans%=MOD
  for j in Tree[i]:
    if j==p:
      continue
    dfs(i,j)
Tree[0].append(-1)
ans=K
dfs(-1,0)
print(ans%MOD)
def gcd(a,b):
  while b:a,b=b,a%b
  return a
n=int(input())
a=list(map(int,input().split()))
left=[a[0]]
for i in range(1,n):left.append(gcd(left[-1],a[i]))
right=[a[n-1]]
for i in range(n-2,-1,-1):right.append(gcd(right[-1],a[i]))
right.reverse()
ans=max(right[1],left[n-2])
print(max(ans,max(gcd(left[i-1],right[i+1])for i in range(1,n-1))))

### FIXED CODE ###

def gcd(a,b):
  while b:a,b=b,a%b
  return a
n,a,b=int(input()),list(map(int,input().split())),[]
if n==2:print(max(a[0],a[1]))
elif n==3:print(max(gcd(a[0],a[1]),gcd(a[0],a[2]),gcd(a[1],a[2])))
else:
  no,mi=a[0],a[0]
  for i in range(1,n):
    s=gcd(no,a[i])
    if s!=no:
      no=max(s,mi)
      mi=gcd(s,mi)
  print(no)
N = int(input())
A = list(map(int,input().split()))
PI = 1
if 0 in A:
    PI = 0
else:
    for i in range(N):
        PI = PI*A[i]
        elif PI > 10**(18):
            PI = -1
            break
print(PI)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
PI = 1
if 0 in A:
    PI = 0
else:
    for i in range(N):
        PI = PI*A[i]
        if PI > 10**(18):
            PI = -1
            break
print(PI)
h,w=map(int,input().split())
if h==1 and w==1:
  print(1)
else:
  if (h*w)%2==1:
    print(int(int(h*w//2)+1))
  else:
    print(int(h*w/2))

### FIXED CODE ###

l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(l[int(input())-1])
N = int(input())
l = list(map(int, input().split()))
sum = 0
for i in l:
  sum = sum + 1/l
print(1/sum)

### FIXED CODE ###

N = int(input())
A = map(int, input().split())
print(1 / sum(1 / x for x in A))
import sys
sys.setrecursionlimit(10**5)

H, W = map(int, input().split())
S = [input() for _ in range(H)]
check = [[0]*W for _ in range(H)]
di = [-1, 0, 1, 0]
dj = [ 0,-1, 0, 1]

black, white = 0, 0

def dfs(i, j):
    global check, black, white
    if check[i][j]:
        return
    else:
        check[i][j] = 1
    if S[i][j] == '#':
        black += 1
    else:
        white += 1
    for dir in range(4):
        ni = i + di[dir]
        nj = j + dj[dir]
        if ni < 0 or ni >= H or nj < 0 or nj >= W: continue
        if S[i][j] == S[ni][nj]: continue
        dfs(ni, nj)

ans = 0
for i in range(H):
    for j in range(W):
        black, white = 0, 0
        dfs(i, j)
        ans += black * white

print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

H, W = map(int, input().split())
S = [input() for _ in range(H)]
check = [[0]*W for _ in range(H)]
di = [-1, 0, 1, 0]
dj = [ 0,-1, 0, 1]
black, white = 0, 0

def dfs(i, j):
    global check, black, white
    if check[i][j]:
        return
    else:
        check[i][j] = 1
    if S[i][j] == '#':
        black += 1
    else:
        white += 1
    for dir in range(4):
        ni = i + di[dir]
        nj = j + dj[dir]
        if ni < 0 or ni >= H or nj < 0 or nj >= W: continue
        if S[i][j] == S[ni][nj]: continue
        dfs(ni, nj)
    return

ans = 0
for i in range(H):
    for j in range(W):
        black, white = 0, 0
        dfs(i, j)
        ans += black * white

print(ans)
a, b = input().split()
if a > 8 or b > 8:
  print(":(")
else:
  print("Yay!")

### FIXED CODE ###

a, b = map(int,input().split())
if a > 8 or b > 8:
  print(":(")
else:
  print("Yay!")
a, b = int(map, input().split())

h = a + b

if h < 24:
  print(h)
else:
  print(24 - h)

### FIXED CODE ###

a, b = map(int, input().split())
 
h = a + b
 
if h < 24:
  print(h)
else:
  print(h - 24)
N = int(input())
S = input()
K = int(input())


for i in range(N):
    if S[K - 1] != S[i]:
        S[i] = '*'
        
print(S)


### FIXED CODE ###

N = int(input())
S = input()
K = int(input())

str_list = list(S)

for i in range(N):
    if str_list[K - 1] != str_list[i]:
        str_list[i] = '*'

S = "".join(str_list)
print(S)
class gv:
    input:str = None;
    
def build():
    gv.str = input()

def solve():
    slen = len(gv.str)
    if (slen&1) == 1:
        print("No")
        return
    
    for i in range(0,slen,2):
        if (gv.str[i:i+2] == "hi") :
            pass
        else :
            print("No")
            return
    
    print("Yes")
    
    

build()
solve()


### FIXED CODE ###

class gv:
    input = None;
    
def build():
    gv.str = input()

def solve():
    slen = len(gv.str)
    if (slen&1) == 1:
        print("No")
        return
    
    for i in range(0,slen,2):
        if (gv.str[i:i+2] == "hi") :
            pass
        else :
            print("No")
            return
    
    print("Yes")
    
    

build()
solve()
import math


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

dp = [math.inf] * N
dp[0] = 0
for i in range(N):
    for j in (i + 1, i + 2):
        if j < N:
            dp[j] = min(dp[j], dp[i] + abs(h[j] - h[i]))
print(dp[N-1])

### FIXED CODE ###

N = int(raw_input())
h_str = raw_input()
h = []
for h_i in h_str.split(" "):
    h.append(int(h_i))

dp = [10 ** 9 + 1] * N
dp[0] = 0
for i in range(N):
    for j in (i + 1, i + 2):
        if j < N:
            dp[j] = min(dp[j], dp[i] + abs(h[j] - h[i]))
print(dp[N-1])
n = int(input())
s = input()
cnt = 0
    for i in range(n):
        if i == n-2 or i== n-1 :
            continue
        if s[i]== "A" and s[i+1] == "B" and s[i+2] == "C" :
            cnt+=1
    print(cnt)

### FIXED CODE ###

n = int(input())
s = input()
cnt = 0
for i in range(n):
    if i == n-2 or i== n-1 :
        continue
    if s[i]== "A" and s[i+1] == "B" and s[i+2] == "C" :
        cnt+=1
print(cnt)
n = len(s)
sa = s[:int((n-1)/2)]
sb = s[int((n+3)/2)-1:]
if s == s[::-1] and sa == sa[::-1] and sb == sb[::-1]:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

s = input()
n = len(s)
sa = s[:int((n-1)/2)]
sb = s[int((n+3)/2)-1:]
if s == s[::-1] and sa == sa[::-1] and sb == sb[::-1]:
    print("Yes")
else:
    print("No")
import numpy as np

N = int(input())
Ws = np.array(map(int,input().split()))

ret = []
for T in range(1,N):
  s1 = Ws[Ws<=T]
  s2 = Ws[Ws>T]
  ret.append(abs(s1-s2))
  
print(min(ret))

### FIXED CODE ###

import numpy as np

N = int(input())
Ws = np.array(list(map(int,input().split())))

ret = []
for i in range(N):
  s1 = Ws[:i+1].sum()
  s2 = Ws[i+1:].sum()
  ret.append(abs(s1-s2))
  
print(min(ret))
n = int(input())
A = list(map(int, input().split()))

C = list(itertools.combinations(A, 2))
C = list(c for c in C if c[0] == c[1])
equal = len(C)

for i in range(n):
    A_tmp = A[: i] + A[i + 1: ]
    equal_i = A_tmp.count(A[i])
    print(equal - equal_i)

### FIXED CODE ###

import math
import collections

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

equal = 0
elements = collections.Counter(A)
equal = sum([v * (v - 1) // 2 for v in elements.values()])

for i in range(n):
    equal_i = elements[A[i]] - 1
    print(equal - equal_i)
A,B,X = map(int,input().split())
if A+B >=X and A<X:
  print('YES')
elif:
  print('NO')

### FIXED CODE ###

A,B,X = map(int,input().split())
if A+B >=X and A<=X:
  print('YES')
else:
  print('NO')