using System.Collections.Generic;
public static bool IsIsomorphic(string s, string t) {
Dictionary<char,char> map = new();
HashSet<char> image = new();
for (int i = 0; i < s.Length; ++i) {
if (map.ContainsKey(s[i])) {
if (map[s[i]] == t[i]) continue;
else if (!image.Contains(t[i])) {
public static void Main()
Console.WriteLine(IsIsomorphic(s,t));