(defn f [s]
(->> (drop-while (fn [[a b]] (not-every? not (map = a b)))
(repeatedly #(list (seq s) (shuffle (seq s)))))
first
second
(apply str)))
(println (f "hoge"))
KGRlZm4gZiBbc10KICAoLT4+IChkcm9wLXdoaWxlIChmbiBbW2EgYl1dIChub3QtZXZlcnk/IG5vdCAobWFwID0gYSBiKSkpCiAgICAgICAgICAgICAgICAgICAocmVwZWF0ZWRseSAjKGxpc3QgKHNlcSBzKSAoc2h1ZmZsZSAoc2VxIHMpKSkpKQogICAgICAgZmlyc3QKICAgICAgIHNlY29uZAogICAgICAgKGFwcGx5IHN0cikpKQoKKHByaW50bG4gKGYgImhvZ2UiKSk=