using System.Collections.Generic;
public static bool IsIsomorphic(string s, string t) {
if (s.Length != t.Length)
Dictionary<char, char> dictS = new Dictionary<char, char>();
Dictionary<char, char> dictT = new Dictionary<char, char>();
for (int i = 0; i < s.Length; i++) {
if (dictS.ContainsKey(charS)) {
if (dictS[charS] != charT) {
if (dictT.ContainsKey(charT)) {
if (dictT[charT] != charS) {
static void Main(string[] args) {
bool result = IsIsomorphic(s1, s2);
Console.WriteLine(result);
result = IsIsomorphic(s3, s4);
Console.WriteLine(result);