peterverebics/CodeNet_Python_118 huggingface dataset:
a, b, c = map(int, input().split())
if c**0.5>a**0.5+b**0.5:
    print("Yes")
else:
    print("No")
import math
x,y,z = map(int, input().split())

if math.sqrt(x) + math.sqrt(y) < math.sqrt(z):
  print('Yes')
else:
  print('No')
a, b, c = map(int, input().split())

if 4*a*b < (c-a-b)**2:
    print('Yes')
else:
    print('No')
# -*- coding: utf-8 -*-
import sys
import numpy as np

sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

def main():
    a,b,c=map(np.float128,input().split())
    
    if np.sqrt(a)+np.sqrt(b)<=np.sqrt(c):
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()
import math
a, b, c = map(int, input().split())
L = a + b + 2 * math.sqrt(a * b)
R = c
print('Yes' if L < R else 'No')
import math
a, b, c = list(map(int, input().split()))

l = 2 * ((a * b) ** 0.5) + a + b

if l < c:
    print("Yes")
else:
    print("No")
a,b,c=map(int,input().split())
if(a**0.5+b**0.5<c**0.5):
  print("Yes")
else:
  print("No")
def main():
 a,b,c = map(int,input().split())
 lhs = a ** 2 + b ** 2 - c ** 2
 rhs = 4 * a * b
 if lhs > 0  and lhs < rhs:
  print('Yes')
 else:
  print('No')
main()
a, b, c = list(map(int, input().split()))
a = a**0.5
b = b**0.5
c = c**0.5
print("Yes") if a+b < c else print("No")
import math
from decimal import Decimal
a,b,c = (int(x) for x  in input().split())
if Decimal(math.sqrt(a)) + Decimal(math.sqrt(b)) < Decimal(math.sqrt(c)):
    print("Yes")
else:
    print("No")
import math
 
a, b, c = map(int, input().split())


if math.sqrt(a*b)< c - a - b:
  print("Yes")
else:
  print("No")
import math
a,b,c=map(int,input().split())
d=a**0.5 + b**0.5
print(d)
if d < c**0.5:
    print('Yes')
else:
    print('No')
import math
from decimal import Decimal

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

'''
誤差でアウト
if math.sqrt(num[0]) + math.sqrt(num[1]) < math.sqrt(num[2]):
    print("Yes")
else:
    print("No")
'''


a = num[0]**0.5
b = num[1]**0.5
c = num[2]**0.5

if (c-(a+b))**2 - 4*a*b > 0:
    print("Yes")
else:
    print("No")

'''
if (c**2 - (a+b)**2)/(c+a+b) > 0:
    print("Yes")
else:
    print("No")
'''
from decimal import *
getcontext().prec = 11
#import numpy as np

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

##print(a**0.5, b**0.5, c**0.5)
if Decimal(a).sqrt()+ Decimal(b).sqrt() < Decimal(c).sqrt():
    print('Yes')
else:
    print('No')

#if 2*((a*b)**0.5) < c - a - b:
    #print('Yes')
#else:
    #print('No')

'''
if float(np.sqrt(a))+float(np.sqrt(b)) < float(np.sqrt(c)):
    print('Yes')
else:
    print('No')]
'''
# -*- coding: utf-8 -*-
import math

input_num = input().split(" ")
a = int(input_num[0])
b = int(input_num[1])
c = int(input_num[2])


if a+b-c-2*math.sqrt(a*b) < 0:
  print("Yes")
else:
  print("No")
import math

a, b, c = [int(n) for n in input().split()]

if 4*a*b < (c - a - b) ** 2:
  print('Yes')
else:
  print('No')
a, b, c = map(int, input().split())
#import numpy as np
import math
#abc_sq = np.sqrt(abc)
if 4*a*b < (c - a - b)**2:
    print('Yes')
else:
    print('No')
a,b,c=map(int,input().split())
l=2*a*b
r=(c*c)+(b*b)+(a*a)-(2*(a*c))-(2*b*c)
if l<r:
    print("Yes")
else:
   print("No")
import math
s = input().split()
a = float(s[0])
b = float(s[1])
c = float(s[2])
if -2*math.sqrt(a)*math.sqrt(b)+c-a-b>0:
  print("Yes")
else:
  print("No")
a, b, c = map(int, input().split())
de = c - a - b
dob = a * b * 4

if dob < de*de:
    print("Yes")
else:
    print("No")
a,b,c = map(int, input().split())

#sqrt(a)+sqrt(b) < sqrt(c)
#(sqrt(a)+sqrt(b))**2 < c
#a + 2*sqrt(a)*sqrt(b) + b < c
#2*sqrt(a)*sqrt(b) < c - a - b
#4ab < (c - a - b)**2

if 4*a*b < (c-a-b)**2:
    print("Yes")
else:
    print("No")
import math

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

s = math.sqrt(c)/(math.sqrt(a)+math.sqrt(b))

if s>1:
    print('Yes')
else:
    print('No')
from decimal import *
getcontext().prec = 100
a, b, c = map(int, input().split())

a = Decimal(a).sqrt()
b = Decimal(b).sqrt()
c = Decimal(c).sqrt()

if a + b < c:
    print("Yes")
else:
    print("No")
import math

a,b,c=map(float,input().split())
if math.sqrt(a)+math.sqrt(b)<c:
    print("Yes")
else:
    print("No")
import numpy
a,b,c = map(int, input().split())
if numpy.longdouble(a ** 0.5) + numpy.longdouble(b ** 0.5) < numpy.longdouble(c ** 0.5):
    print('Yes')
else:
    print('No')
a,b,c=map(int,input().split())
import math
if 4*a*b<(c-a-b)**2:
    print('Yes')
else:
    print('No')
a, b, c = map(int, input().split())
print(["No", "Yes"][(a**0.5 + b ** 0.5 < c **0.5)])
a, b, c = map(int, input().split())

d = c - a - b
if d > 0 and d > 4 * a * b > 0:
	print('Yes')
else:
	print('No')
a, b, c = map(int, input().split())
num = c**2+a**2+b**2-2*a*c+2*a*b-2*b*c
if num > 4*a*b:
  print("Yes")
else:
  print("No")
#pana c 
a,b,c=map(int,input().split())

d=4*a*b 
e=(c-a-b)**2
if a==c or b==c:
    print("No")
else:
    if d<e:
        print("Yes")
    else:
        print("No")
import numpy as np
a, b, c = map(int, input().split())

a = np.sqrt(a)
b = np.sqrt(b)
c = np.sqrt(c)

if a+b<c:
  print('Yes')
else:
  print('No')
import math
a, b, c = map(int, input().split())
if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
    print("Yes")
else:
    print("No")
a = list(map(int, input().split()))
import math
k = a[0] ** 0.5 + a[1] ** 0.5 - a[2] ** 0.5
if k < 0:
  print("Yes")
else:
  print("No")
import decimal

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

a=decimal.Decimal(a)
b=decimal.Decimal(b)
c=decimal.Decimal(c)
if(decimal.Decimal(2)*a.sqrt()*b.sqrt()<c-a-b):
    print("Yes")
else:
    print("No")
import math
 
datas = input().split(" ")
 
a = float(datas[0])
b = float(datas[1])
c = float(datas[2])
 
if(math.sqrt(a)+math.sqrt(b) < math.sqrt(c)):
  print( "Yes" )
else:
  print( "No" )
import math
a,b,c = map(int, input().split())
k = math.sqrt(a)+math.sqrt(b)
if k<math.sqrt(c):
  print('Yes')
else:
  print('No')
a,b,c=map(int,input().split())
tmp=(a/c)**0.5+(b/c)**0.5
if tmp<1:
    print("Yes")
else:
    print("No")
a, b, c = map(int, input().split())
x = a ** 0.5
y = b ** 0.5
z = c ** 0.5
p = "No"
if (x + y < z):
  p = "Yes"
print(p)
import math
a, b, c = map(int, input().split())

if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
    print('Yes')
else:
    print('No')
a = list(map(int, input().split()))
import math
k = math.sqrt(a[0]) + math.sqrt(a[1])

if k < math.sqrt(a[2]):
  print("Yes")
else:
  print("No")
a, b, c = [int(x) for x in input().split(" ")]

if a**(1/2) + b**(1/2) < c**(1/2):
  print("Yes")
else:
  print("No")
# coding: utf-8

import math

# 標準入力 <int><int>
a, b, c = map(int, input().split())

A = math.sqrt(a)
B = math.sqrt(b)
C = math.sqrt(c)

ans = "No"

if A + B <= C:
    ans = "Yes"

print(ans)
import math

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

print( "Yes" if math.sqrt(a) + math.sqrt(b) < math.sqrt(c)else "No")
import numpy as np
import sys
a,b,c = map(int,input().split())
import math
ans = a + b - 2*(math.sqrt(a*b))
print(ans)
if ans<c and -c<ans:
    print("Yes")
else:
    print("No")
from math import sqrt
a, b ,c = map(int, input().split())
ans = a + b + - c + 2*sqrt(a*b)
print("Yes") if ans<0 else print("No")
import math
a, b, c = map(int, input().split())


ab_expand = a + 2*(math.sqrt(a*b)) + b
if math.floor(ab_expand) < c < round(ab_expand, 5) or ab_expand < c:
    print('Yes')
else:
    print('No')

print(ab_expand)
print(math.floor(ab_expand))
print(round(ab_expand, 1))
import math
a,b,c=map(int,input().split())
res=math.sqrt(a)+math.sqrt(b)
if res<math.sqrt(c):
    print("Yes")
else:
   print("No")
a,b,c=map(int,input().split())
from decimal import Decimal

print('Yes' if Decimal(a)**Decimal(0.5)+Decimal(b)**Decimal(0.5)<=Decimal(c)**Decimal(0.5) else 'No')
import numpy


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

if numpy.sqrt(a) + numpy.sqrt(b) < numpy.sqrt(c):
  print('Yes')
else:
  print('No')
import math
a,b,c=map(int,input().split())
A=a**0.5
B=b**0.5
C=c**0.5
if A+B<C:
  print("Yes")
else:
  print("No")
import sys
import numpy as np
readline = sys.stdin.buffer.readline

a,b,c = map(int,readline().split())
if np.sqrt(a)+np.sqrt(b) < np.sqrt(c):
    print("Yes")
else:
    print("No")
a, b, c = map(int, input().split())
if a**0.5 + b**0.5 < c**0.5:
    print("Yes")
else:
    print("No")
def resolve():
    A, B, C = map(int, input().split())

    if (pow(A, 0.5) + pow(B, 0.5)) < pow(C, 0.5):
        print('Yes')
        return

    print('No')


resolve()
import numpy
[a, b, c] = list(map(int, input().split()))

flg = 'No'
if numpy.sqrt(a) + numpy.sqrt(b) < numpy.sqrt(c):
    flg = 'Yes'

print(flg)
from decimal import *
getcontext().prec = 100
#import numpy as np

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

##print(a**0.5, b**0.5, c**0.5)
if Decimal(a).sqrt()+ Decimal(b).sqrt() < Decimal(c).sqrt():
    print('Yes')
else:
    print('No')
[a,b,c] = [int(x) for x in input().split()]

if 2*(a*b)**0.5 < c - a - b:
    print("Yes")
else:
    print("No")
import numpy as np
a,b,c= map(int,input().split())

if np.sqrt(a)+np.sqrt(b) < np.sqrt(c):
    print('Yes')
else:
    print('No')
import math
a = input().split()
x = int(a[0])
y = int(a[1])
z = int(a[2])
if math.sqrt(x)+math.sqrt(y)<math.sqrt(z):
        print("YES")
else:
        print("NO")
a, b, c = map(int, input().split())

import math

if (a + b + 2*math.sqrt(a)*math.sqrt(b))<c:
  print('Yes')
else:
  print('No')
def main():
    from decimal import Decimal

    a,b,c = map(int, input().split())
    a,b,c = Decimal(a**.5) ,Decimal(b**.5), Decimal(c**.5)
    f = a + b < c
    print("Yes" if f else "No")

if __name__ == '__main__':
    main()
import numpy as np
a, b, c = list(map(int, input().split()))
if np.sqrt(a**0.5) + np.sqrt(b**0.5) < np.sqrt(c**0.5):
    print("Yes")
else:
    print("No")
from sys import stdin
import math

def main():

    input = stdin.readline

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

    if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()
a,b,c = map(int,input().split())
import math

if float(math.sqrt(a))+float(math.sqrt(b)) < float(math.sqrt(c)):
    print('Yes')
else:
    print('No')
import math
a,b,c = map(int, input().split())
if a<99900000 or b<99900000 or c<99900000:
  if b+c<-(-(a-(-(b-c)**2//a))//2):
    print("Yes")
  else:
    print("No")
else:
  print("Yes")
import math
a,b,c = map(int,input().split())

aa = math.sqrt(a)
bb = math.sqrt(b)
cc = math.sqrt(c)

if aa+bb<cc:
  print("Yes")
else:
  print("No")
from math import sqrt
a, b, c = map(int, input().split())

if 2 * sqrt(a * b) < c - a - b:
    print("Yes")
else:
    print("No")
a, b, c = map(int, input().split())
ans = 'Yes' if c - a - b > 2*(a*b)**0.5 else 'No'
print(a + b + 2 * (a*b)**0.5, c)
import math

a, b, c = map(int, input().split(' '))
if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
    print('Yes')
else:
    print('No')
import numpy

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

if numpy.sqrt(a) + numpy.sqrt(b) < numpy.sqrt(c):
    print("Yes")
else:
    print("No")
a,b,c = map(int, input().split())
import math

A = a+b+2*math.sqrt(a*b)

if A < c:
  print("Yes")
else:
  print("No")
import sys
import math
input = sys.stdin.readline

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

    if (4 * a * b) < ((c - a - b) ** 2):
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()
import math
import numpy

def main():
    a,b,c = map(int,input().split())
    temp = 10 ** 9
    if math.sqrt(a * temp) + math.sqrt(b * temp) < math.sqrt(c * temp):
        print("Yes")
    else:
        print("No")

main()
a, b, c = map(int, input().split())
if c - a - b >= 0:
    if a ** 2 + b ** 2 + c ** 2 - 2 * b * c - 2 * a * b - 2 * a * c > 0:
        print('Yes')
    else:
        print('No')
else:
    if a ** 2 + b ** 2 + c ** 2 - 2 * b * c - 2 * a * b - 2 * a * c < 0:
        print('Yes')
    else:
        print('No')
inp = list(map(int,input().split()))
a =inp[0]
b = inp[1]
c = inp[2]
if (0< a**2 +b**2 + c**2- 2*(a*b + b*c + a*c)):
    print("Yes")
else:
    print("No")
import math

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

if math.sqrt(a*b)+a+b<c:
    print('Yes')
else:
    print('No')
import math
i = list(map(int, input().split()))

a = i[0]
b = i[1]
c = i[2]

a = math.sqrt(a)
b = math.sqrt(b)
c = math.sqrt(c)

if(a + b) > c:
    print('Yes')
else:
    print('No')
#C
import math
a,b,c=map(int,input().split())
ab=a**0.5+b**0.5
if ab<(c**0.5):
    print("Yes")
else:
    print("No")
A = list(map(int, input().split()))  # 入力のときに N を使う必要はありません
a=A[0]
b=A[1]
c=A[2]
if(a*a+b*b+c*c-2*a*b-2*b*c-2*c*a>0):
  print("Yes")
else:
  print("No")
a, b, c = map(int, input().split())
if a**0.5+b**0.5 < c**0.5:
    print ("Yes")
else:
    print ("No")
import sys
sys.setrecursionlimit(10 ** 7)


N = int(input())
L = list("abcdefghij")

def nasu(x, n, e):
  if n == N:
    print(x)
    return
  for i in range(e + 1):
    if i == e:
      nasu(x + L[i], n + 1, e + 1)
    else:
      nasu(x + L[i], n + 1, e)

nasu("", 0, 0)
N = int(input())
def dfs(s, l, char_num):
    if l == N:
        print(s)
    else:
        for i in range(char_num+1):
            ns = s+chr(97+i)
            dfs(ns, l+1, len(set(ns)))

dfs('a',1, 1)
import sys
sys.setrecursionlimit(10**8)
alpha = "abcdefghij"
ans = []
N = int(input())

def dfs(S, num):
    if len(S) == N:
        ans.append(S)
    else:
        right = num + 2
        seq = alpha[:right]
        for i, c in enumerate(seq):
            dfs(S+c, max(i, num))

dfs("a", 0)
ans = sorted(ans)
for a in ans:
    print(a)
import itertools

n = int(input())

alpha_list = ['a','b','c','d','e','f','g','h','i','j']
string_list = []
count = 0

def extend(string,count,n):
    if len(string) >= n:
        string_list.append(string)
        return True
    else:
        for i in range(count+1):
            sc = string
            sc += alpha_list[i]
            if i == count:
                count += 1
            extend(sc,count,n)
    
extend('',count,n)

string_list.sort()
for s in string_list:
    print(s)
N = int(input())
def fac(N):
    if N == 1:
        return [['a']]
    li = []
    for x in fac(N-1):
        n = len(set(x))
        for i in range(n+1):
            li.append(x+[chr(97+i)])
    return li
for x in fac(N):
    print(''.join(x))
# -*- coding: utf-8 -*-
import sys
import copy

def int2char(x):
    return chr(ord('a')+x)


N = int(input())
dp = ['a']
for i in range(N-1):
    nxt = []
    for s in dp:
        sets = set()
        for t in s:
            sets.add(t)
        for i in range(len(list(sets))+1):
            nxt.append(s+int2char(i))
    dp = copy.copy(nxt)

for s in dp:
    print(s)
def ansstr(s,n,c):
    if len(s)==n:
        print(s)
    else:
        for i in range(c+1):
            a=0
            ch=chr(ord('a')+i)
            if i==c:
                a=1
            ansstr(s+ch,n,c+a)
    
    
n=int(input())
ansstr("a",n,1)
import sys 
sys.setrecursionlimit(4100000)

N = int(input())

def dfs(i,s):
    if len(s) == N:
        
        return print(s)
    
    for x in range(97,i + 1):
        t = s + chr(x)
        
        dfs(max(x + 1,i),t)
    
    
dfs(ord("a"),"")
n=int(input())
if n==1:
    print('a')
    exit()
ans=['a']
al=list('abcdefghijklmnopqrsruvwxyz')
for i in range(n-1):
    tmp=[]
    for j in ans:
        sn=len(set(j))
        for k in range(sn+1):
            tmp.append(j+al[k])  
    ans=tmp
ans.sort()
for i in ans:
    print(i)
N=int(input())
global key
key="abcdefghij"
def normal(N):
    if N==1:
        return ["a"]
    else:
        new=[]
        lis=normal(N-1)
        for s in lis:
            i=0
            while key[i] in s:
                new.append(s+key[i])
                i+=1
            new.append(s+key[i])
    return new
lis=normal(N)
for s in lis:
    print(s)
n = int(input())

abc = list('abcdefghijk')


def solve(ans):
    if len(ans) == n:
        print(*ans, sep='')
    else:
        idx = max([abc.index(ans[i]) for i in range(len(ans))])
        for i in range(idx+2):
            nans = ans + [abc[i]]
            solve(nans)


solve(['a'])
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

N = inp()

ans = ["a"]
for i in range(N-1):
    nans = []

    for S in ans:
        m = max(S)
        for x in range(ord(m)-95):
            nans.append(S+chr(97+x))

    ans = copy.copy(nans)

print("\n".join(ans))
#TODO
def dfs(word, idx):
    if len(word)==n:
        print(word)
        return
    for j in range(idx):
        dfs(word+chr(j+mx), idx)
    dfs(word+chr(idx+mx), idx+1)

n = int(input())
mx = ord('a')
dfs("", 0)
# パナソニック2020D
from queue import deque
n = int(input())
q = deque([("a", "a")])
while True:
    s, m = q.pop()
    if len(s)==n:
        print(s)
    elif len(s)>=n+1:
        break
    for o in range(ord("a"), ord(m)+2):
        if ord(m)<o:
            m = chr(o)
        q.appendleft((s + chr(o), m))
from string import ascii_lowercase as alph

def gen_pattern(N, pre=""):
  for i in range(ord(max(pre or "\x60"))-0x5f):
    pattern = pre+alph[i]
    if len(pattern) == N:
      print(pattern)
    else:
      gen_pattern(N, pattern)

gen_pattern(int(input()))
N = int(raw_input())

char_list = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]

prev = ["a"]

for i in range(1, N):
    temp = []
    for item in prev:
        item_list = []
        for j in range(len(item)):
            item_list.append(item[j])
        num_char = len(set(item_list))
        for j in range(num_char+1):
            temp.append(item+char_list[j])

    prev = temp


print ' '.join(map(str, prev))
import math
import collections
import fractions
import itertools
import functools
import operator
import bisect

def solve():
    n = int(input())
    sushi = ["a"]
    alt = [chr(ord("a") + i) for i in range(n)]
    for i in range(n-1):
        sushi = [ans + x for ans in sushi for x in alt[:len(set(ans)) + 1]]
    for i in sushi:
        print(i)
    return 0

if __name__ == "__main__":
    solve()
n = int(input())
A = 'a'
S = 'abcdefghij'
for _ in range(n-1):
    A = [ a + s for a in A for s in S[:len(set(a)) + 1]]
print('\n'.join(A))
C = 'abcdefghijklmnopqrstuvwxyz'
N = int(input())
def dfs(s):
  l = len(s)
  if l >= N:
    print(s)
    return
  for i in range(l+1):
    if len(set(s)) < i:
      continue
    dfs(s+C[i])
dfs('')
N = int(input())


def f(L, m):
    l = len(L)
    if l == N:
        print(''.join(list(map(lambda i: chr(i + 96), L))))
        return
    for d in range(1, min(l + 1, m + 1) + 1):
        f(L + [d], max(m, d))


f([1], 1)
N=int(input())
alphabets = [chr(ord('a') + x) for x in range(26)]
def dfs(n,s,maxc):
    if len(s)==N:
        print(''.join(s))
        return True
    for i in range(maxc+1):
        if i==maxc:
            maxc+=1
        dfs(n+1,s+[alphabets[i]],maxc)
s=[]
dfs(0,s,0)
#!/usr/bin/env python3
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**5)

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

def dfs(arr, max_val):
    if len(arr) == n:
        ans.append(arr)
        return
    for i in range(max_val + 2):
        next_arr = arr[:]
        next_arr.append(i)
        dfs(next_arr, max(max_val, i))

dfs([0], 0)

ans.sort()
orda = ord("a")
for line in ans:
    print("".join([chr(orda + item) for item in line]))
n = int(input())
a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']

def dfs(s, count):
    if len(s) == n:
        print(s)
        return

    for z in range(count + 1):
        dfs(s + a[z], count + 1 if z == count else count)


dfs("", 0)
N = int(input())
strlist = 'abcdefghij'

def dfs(s, i):
  if len(s) == N:
    print(s)
  else:
    for j in range(i+1):
      t = s + strlist[j]
      if j == i:
        dfs(t, i+1)
      else:
        dfs(t, i)

dfs('', 0)
import math
n = int(input())

ans = []
d = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']

todo = ['a']
while len(todo)>0:
    p = todo.pop(-1)
    l = len(p)
    cou = len(set(p))
    if l < n:
        for i in range(cou+1):
            todo.append(p+d[i])
    else:
        ans.append(p)


print('\n'.join(sorted(set(ans))))
n = int(input())
moji = "abcdefghijklmnopqrstuvwxyz"
#print(len(moji))

lis = [[0]]
for i in range(n-1):
  temp = []
  for s in lis:
    next = max(s) + 1
    for j in range(0, next+1):
      temp.append(s + [j])
  else:
    lis = temp
#print(lis)

for s in lis:
  for char in s:
    print(moji[char], end="")
  print()
from collections import defaultdict
import string
import sys
sys.setrecursionlimit(10 ** 7)
from functools import lru_cache

N = int(input())
alph = string.ascii_lowercase

def search(S, mx):
    if len(S) == N:
        print(S)
    else:
        for s in alph[: mx + 1]:
            search(S + s, mx)
        search(S + alph[mx + 1], mx + 1)

search('a', 0)
n = int(input())
al = [chr(i) for i in range(97,97+26)]

dpn = ['a']
dpp = []
if n == 1:
    print('a')
    exit()
for i in range(1,n):
    for j in dpn:
        for k in al[:max(list(map(ord,list(j))))-97+2]:
            if i != n-1:
                dpp.append(j + k)
            else:
                print(j+k)
    if i != n-1:
        dpn = dpp
        dpp = []
N = int(input())
inp = 'a'

def AAA(arr):
    if len(arr) < N:
        for i in range(ord(max(arr))-96+1):
            AAA(arr+chr(i+1+96))
    else:
        print(arr)


AAA(inp)
from string import ascii_lowercase as alph

def gen_pattern(N, pre="", m=-1):
  for i in range(m+2):
    pat = pre+alph[i]
    if len(pat) == N:
      yield pat
    else:
      yield from gen_pattern(N, pat, max(i,m))

for pattern in gen_pattern(int(input())):
  print(pattern)
import copy,collections
N = int(input())
s = ['a']
for i in range(2,N+1):

    tmp = copy.copy(s)
    tmp2 = []
    for tm in tmp:
        tc = collections.Counter(tm)
        lc = len(tc.values())
        for j in range(1,lc+2):
            tmp2.append(tm+chr(96+j))
    s = copy.copy(tmp2)
for sa in s:
    print(sa)
from collections import deque
N = int(input())

alphabet = "abcdefghij"
visited = 1
st = deque([["a", visited]])

while len(st) > 0:
    str, visited = st.popleft()

    if len(str) == N:
        print(str)
    else:
        # すでに使った文字を使う
        for x in alphabet[0 : visited]:
            st.append([str + x, visited])
        # まだ使っていない文字を使う
        # len(str) < Nだから、visited < N
        st.append([str + alphabet[visited], visited + 1])
def f(num,N,S):
    alphabet = ["a","b","c","d","e","f","g","h","i","j"]
    if N == num:
        for i in range(len(S)):
            print(S[i])
        return
    else:
        tmp = []
        length = len(S)
        for i in S:
            ttmp = sorted(list(i))
            for j in range(alphabet.index(ttmp[-1])+2):
                tmp.append(i+alphabet[j])
        f(num+1,N,tmp)
 
N = int(input())
f(1,N,["a"])
n=int(input())
L=["a"]
for i in range(n-1):
    tmp=[]
    for j in range(len(L)):
        for k in range(len(set(L[j]))+1):
            tmp.append(L[j]+chr(ord("a")+k))
    L=tmp
for j in range(len(L)):
    print(L[j])
n = int(input())

def normal_form(x):
    if x == 1:
        return ['a']
    temp = normal_form(x-1)
    res = []
    for s in temp:
        for k in range(ord(max(s))-97+2):
            res.append(s+chr(k+97))
    return res

print('\n'.join(normal_form(n)))
N = int(input())
D = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
Ans = [["a"]]
for i in range(1, 10):
    before = Ans[i - 1]
    # print(before)
    next = []
    for j in before:
        L = set(list(j))
        # print(L)
        for k in range(len(L) + 1):
            # print(j)
            next.append(j + D[k])
    Ans.append(next)
# print(Ans)
print(*Ans[N - 1], sep="\n")
n = int(input())
r = 'a',
for _ in range(n - 1):
  r = {s + c for s in r for c in s + chr(ord(max(s)) + 1)}
print(*sorted(r), sep='\n')
N = int(input())

def dfs(s, mx):
    if len(s) == N:
        print(s)
    else:
        for c in range(ord('a'), ord(mx)+1):
            if chr(c) == mx:
                mx = chr(c+1)
            dfs(s+chr(c), mx)

dfs("", 'a')