class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: F = None
        self.w: I = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: A = None
        self.r: D = None
        self.x: C = None
        self.p: C = None
        self.z: A = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: E = None
        self.y: C = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.s: E = None
        self.r: E = None
        self.y: A = None
        self.p: D = None
        self.x: G = None
        self.w: C = None
        self.z: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: A = None
        self.r: D = None
        self.x: C = None
        self.p: C = None
        self.z: A = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: E = None
        self.y: C = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.s: E = None
        self.r: E = None
        self.y: A = None
        self.p: D = None
        self.x: G = None
        self.w: C = None
        self.z: F = None
        self.txt = txt

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

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

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