Santa Claus decided to disassemble his keyboard to clean it. After he returned all the keys back, he suddenly realized that some pairs of keys took each other's place! That is, Santa suspects that each key is either on its place, or on the place of another key, which is located exactly where the first key should be. 

In order to make sure that he's right and restore the correct order of keys, Santa typed his favorite patter looking only to his keyboard.

You are given the Santa's favorite patter and the string he actually typed. Determine which pairs of keys could be mixed. Each key must occur in pairs at most once.
The input consists of only two strings *s* and *t* denoting the favorite Santa's patter and the resulting string. *s* and *t* are not empty and have the same length, which is at most 1000. Both strings consist only of lowercase English letters.
none
helloworld
ehoolwlroz
3
h e
l o
d z
hastalavistababy
hastalavistababy
0
merrychristmas
christmasmerry
-1
kusyvdgccw
kusyvdgccw
0
bbbbbabbab
aaaaabaaba
1
b a
zzzzzzzzzzzzzzzzzzzzz
qwertyuiopasdfghjklzx
-1
accdccdcdccacddbcacc
accbccbcbccacbbdcacc
1
d b
giiibdbebjdaihdghahccdeffjhfgidfbdhjdggajfgaidadjd
giiibdbebjdaihdghahccdeffjhfgidfbdhjdggajfgaidadjd
0
gndggadlmdefgejidmmcglbjdcmglncfmbjjndjcibnjbabfab
fihffahlmhogfojnhmmcflkjhcmflicgmkjjihjcnkijkakgak
5
g f
n i
d h
e o
b k
ijpanyhovzwjjxsvaiyhchfaulcsdgfszjnwtoqbtaqygfmxuwvynvlhqhvmkjbooklxfhmqlqvfoxlnoclfxtbhvnkmhjcmrsdc
ijpanyhovzwjjxsvaiyhchfaulcsdgfszjnwtoqbtaqygfmxuwvynvlhqhvmkjbooklxfhmqlqvfoxlnoclfxtbhvnkmhjcmrsdc
0
ab
aa
-1
a
z
1
a z
zz
zy
-1
as
df
2
a d
s f
abc
bca
-1
rtfg
rftg
1
t f
y
y
0
qwertyuiopasdfghjklzx
zzzzzzzzzzzzzzzzzzzzz
-1
qazwsxedcrfvtgbyhnujmik
qwertyuiasdfghjkzxcvbnm
-1
aaaaaa
abcdef
-1
qwerty
ffffff
-1
dofbgdppdvmwjwtdyphhmqliydxyjfxoopxiscevowleccmhwybsxitvujkfliamvqinlrpytyaqdlbywccprukoisyaseibuqbfqjcabkieimsggsakpnqliwhehnemewhychqrfiuyaecoydnromrh
dofbgdppdvmwjwtdyphhmqliydxyjfxoopxiscevowleccmhwybsxitvujkfliamvqinlrpytyaqdlbywccprukoisyaseibuqbfqjcabkieimsggsakpnqliwhehnemewhychqrfiuyaecoydnromrh
0
acdbccddadbcbabbebbaebdcedbbcebeaccecdabadeabeecbacacdcbccedeadadedeccedecdaabcedccccbbcbcedcaccdede
dcbaccbbdbacadaaeaadeabcebaaceaedccecbdadbedaeecadcdcbcaccebedbdbebeccebecbddacebccccaacacebcdccbebe
-1
bacccbbacabbcaacbbba
bacccbbacabbcaacbbba
0
dbadbddddb
acbacaaaac
-1
dacbdbbbdd
adbdadddaa
-1
bbbbcbcbbc
daddbabddb
-1
dddddbcdbd
bcbbbdacdb
-1
cbadcbcdaa
abbbababbb
-1
dmkgadidjgdjikgkehhfkhgkeamhdkfemikkjhhkdjfaenmkdgenijinamngjgkmgmmedfdehkhdigdnnkhmdkdindhkhndnakdgdhkdefagkedndnijekdmkdfedkhekgdkhgkimfeakdhhhgkkff
bdenailbmnbmlcnehjjkcgnehadgickhdlecmggcimkahfdeinhflmlfadfnmncdnddhbkbhgejblnbffcgdbeilfigegfifaebnijeihkanehififlmhcbdcikhieghenbejneldkhaebjggncckk
-1
acbbccabaa
abbbbbabaa
-1
ccccaccccc
aaaabaaaac
-1
acbacacbbb
acbacacbbb
0
abbababbcc
ccccccccbb
-1
jbcbbjiifdcbeajgdeabddbfcecafejddcigfcaedbgicjihifgbahjihcjefgabgbccdiibfjgacehbbdjceacdbdeaiibaicih
hhihhhddcfihddhjfddhffhcididcdhffidjciddfhjdihdhdcjhdhhdhihdcjdhjhiifddhchjdidhhhfhiddifhfddddhddidh
-1
ahaeheedefeehahfefhjhhedheeeedhehhfhdejdhffhhejhhhejadhefhahhadjjhdhheeeehfdaffhhefehhhefhhhhehehjda
eiefbdfgdhffieihfhjajifgjddffgifjbhigfagjhhjicaijbdaegidhiejiegaabgjidcfcjhgehhjjchcbjjdhjbiidjdjage
-1
fficficbidbcbfaddifbffdbbiaccbbciiaidbcbbiadcccbccbbaibabcbbdbcibcciibiccfifbiiicadibbiaafadacdficbc
ddjhdghbgcbhadeccjdbddcbfjeiiaaigjejcaiabgechiiahibfejbeahafcfhjbihgjfgihdgdagjjhecjafjeedecehcdjhai
-1
z
z
0
a
z
1
a z
z
a
1
z a
aa
zz
1
a z
az
za
1
a z
aa
za
-1
za
zz
-1
aa
ab
-1
hehe
heeh
-1
bd
cc
-1
he
hh
-1
hee
heh
-1
aa
ac
-1
ab
aa
-1
hello
ehlol
-1
ac
aa
-1
aaabbb
bbbaab
-1
aa
fa
-1
hg
ee
-1
helloworld
ehoolwlrow
-1
abb
bab
-1
aaa
aae
-1
aba
baa
-1
aa
ba
-1
da
aa
-1
aaa
aab
-1
xy
zz
-1
A, B = input(), input()
keys,maps,mis = set(),[],False
for i in range(len(A)):
    if A[i] != B[i] and [A[i],B[i]] not in maps and [B[i],A[i]] not in maps:
        if A[i] not in keys and B[i] not in keys:
            keys.add(A[i])
            keys.add(B[i])
            maps.append([A[i],B[i]])
        else:
            mis,maps = True,[]
            break
print(len(maps)) if not mis else print(-1)
for i in maps: print(i[0],i[1])
     	   	    	 		    	 	  	