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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: C = None
        self.x: D = None
        self.t: A = None
        self.r: B = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

i = A("i")
k = B("k")
f = C("f")
j = D("j")
e = E("e")
g = F("g")
b = G("b")
m = G("m")
c = E("c")
h = D("h")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: C = None
        self.x: D = None
        self.t: A = None
        self.r: B = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

i = A("i")
k = B("k")
f = C("f")
j = D("j")
e = E("e")
g = F("g")
b = G("b")
m = G("m")
c = E("c")
h = D("h")

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