class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.w: D = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: C = None
        self.y: F = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: G = None
        self.o: I = None
        self.w: A = None
        self.q: I = None
        self.z: I = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: F = None
        self.v: A = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: F = None
        self.o: F = None
        self.w: B = None
        self.y: F = None
        self.t: I = None
        self.v: G = None
        self.x: B = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: E = None
        self.v: F = None
        self.w: B = None
        self.q: E = None
        self.o: G = None
        self.t: A = None
        self.s: G = None
        self.p: F = None
        self.txt = txt

a = A("a")
n = B("n")
b = C("b")
c = D("c")
f = E("f")
g = F("g")
h = G("h")
m = H("m")
e = I("e")

a.o = b
a.t = b
a.w = c
a.q = f
n.w = m
n.z = b
n.y = g
n.o = g
n.x = f
b.v = g
b.r = g
b.s = h
b.o = e
b.q = e
b.z = e
b.w = a
c.o = a
c.v = a
c.t = g
c.w = n
f.p = m
f.s = g
f.o = g
f.y = g
f.w = n
f.x = n
f.r = n
f.t = e
f.v = h
g.y = c
g.r = b
h.o = b
h.u = n
h.y = a
m.v = e
e.u = b
e.z = f
e.q = f
e.v = g
e.p = g
e.w = n
e.o = h
e.s = h
e.t = a
assert g.y.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.w: D = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: C = None
        self.y: F = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: G = None
        self.o: I = None
        self.w: A = None
        self.q: I = None
        self.z: I = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: F = None
        self.v: A = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: F = None
        self.o: F = None
        self.w: B = None
        self.y: F = None
        self.t: I = None
        self.v: G = None
        self.x: B = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: E = None
        self.v: F = None
        self.w: B = None
        self.q: E = None
        self.o: G = None
        self.t: A = None
        self.s: G = None
        self.p: F = None
        self.txt = txt

a = A("a")
n = B("n")
b = C("b")
c = D("c")
f = E("f")
g = F("g")
h = G("h")
m = H("m")
e = I("e")

a.o = b
a.t = b
a.w = c
a.q = f
n.w = m
n.z = b
n.y = g
n.o = g
n.x = f
b.v = g
b.r = g
b.s = h
b.o = e
b.q = e
b.z = e
b.w = a
c.o = a
c.v = a
c.t = g
c.w = n
f.p = m
f.s = g
f.o = g
f.y = g
f.w = n
f.x = n
f.r = n
f.t = e
f.v = h
g.y = c
g.r = b
h.o = b
h.u = n
h.y = a
m.v = e
e.u = b
e.z = f
e.q = f
e.v = g
e.p = g
e.w = n
e.o = h
e.s = h
e.t = a
assert g.y.t.y.txt == "c"