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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: F = None
        self.p: A = None
        self.r: E = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

d = A("d")
k = B("k")
i = C("i")
f = D("f")
n = E("n")
m = F("m")
j = B("j")
a = F("a")
c = F("c")
e = B("e")

d.o = n
k.w = i
k.v = a
k.q = a
k.p = d
k.r = n
k.z = n
i.w = d
f.t = d
n.o = d
n.t = d
n.x = i
n.w = i
m.u = d
m.p = e
m.z = k
j.w = i
j.v = c
j.q = c
j.p = d
j.r = n
j.z = n
a.u = d
a.p = e
a.z = k
c.u = d
c.p = k
c.z = e
e.w = i
e.v = m
e.q = m
e.p = d
e.r = n
e.z = n
assert k.q.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: F = None
        self.p: A = None
        self.r: E = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

d = A("d")
k = B("k")
i = C("i")
f = D("f")
n = E("n")
m = F("m")
j = B("j")
a = F("a")
c = F("c")
e = B("e")

d.o = n
k.w = i
k.v = a
k.q = a
k.p = d
k.r = n
k.z = n
i.w = d
f.t = d
n.o = d
n.t = d
n.x = i
n.w = i
m.u = d
m.p = e
m.z = k
j.w = i
j.v = c
j.q = c
j.p = d
j.r = n
j.z = n
a.u = d
a.p = e
a.z = k
c.u = d
c.p = k
c.z = e
e.w = i
e.v = m
e.q = m
e.p = d
e.r = n
e.z = n
assert k.q.z.z.txt == "n"