n=int(input()) lista=["b","c","d","e","f","g","h","i","j","l"] list1=["0","1","2","3","4","5","6","7","8","9"] ans=[] for i in range(n): for j in range(10): i=str(i).replace(list1[j],lista[j]) ans.append(i) for k in range(n): if k