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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.v: B = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

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

c = A("c")
n = B("n")
m = C("m")
d = D("d")
f = E("f")
b = F("b")
j = E("j")
h = C("h")
e = E("e")

c.z = b
c.q = n
c.y = d
n.t = b
n.q = m
m.r = c
m.v = n
m.p = h
m.o = h
m.q = b
m.t = d
d.t = j
f.s = n
f.v = n
f.w = n
f.q = b
f.y = h
b.p = d
b.s = d
b.o = h
b.y = h
b.u = n
b.z = m
j.s = n
j.v = n
j.w = n
j.q = b
j.y = h
h.r = c
h.v = n
h.p = m
h.o = m
h.q = b
h.t = d
e.s = n
e.v = n
e.w = n
e.q = b
e.y = h
assert c.y.t.q.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: B = None
        self.y: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.v: B = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

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

c = A("c")
n = B("n")
m = C("m")
d = D("d")
f = E("f")
b = F("b")
j = E("j")
h = C("h")
e = E("e")

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