684. String Equivalence
Strings s and t are considered isomorphic if the following conditions are met: ∣s∣=∣t∣. For any pair i,j, one of the following must be true: s[i]=s[j] and t[i]=t[j]. For example, abcac and zyxzx are isomorphic, while abcac and ppppp are not. A string *s* is said to be in normal form if the following condition is satisfied: For every string t that is isomorphic to s, s≤t. Here ≤ represents lexicographic comparison. For example, abcac is in normal form, but zyxzx is not since it is isomorphic to abcac, which is lexicographically smaller than zyxzx. You are given an integer N. Print all strings of length N that are in normal form, in lexicographically ascending order.
The first line contains N.
Print all strings of length N that are in normal form.
1<= N <= 10