class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: E = None
        self.q: D = None
        self.txt = txt

i = A("i")
h = B("h")
e = C("e")
l = D("l")
a = E("a")
m = F("m")
c = E("c")
f = B("f")
g = F("g")

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: E = None
        self.q: D = None
        self.txt = txt

i = A("i")
h = B("h")
e = C("e")
l = D("l")
a = E("a")
m = F("m")
c = E("c")
f = B("f")
g = F("g")

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