arr = "AIDUNYAN".split("")
h = Hash.new{|h, k| h[k] = []}
arr.permutation(8){|arr2| h[arr2[0] + arr2[1]] << arr2[2] + arr2[3] + arr2[4] + arr2[5] + arr2[6] + arr2[7]}
h.values.each{|arr2| arr2.uniq!}
str = "AIZUNYAN"
d = gets.chomp
i = 0
while i <= d.length - 8
    if h[d[i, 2]].include? d[i + 2, 6]
        d[i, 8] = str
        i += 8
    else
        i += 1
    end
end
puts d
