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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: D = None
        self.q: A = None
        self.o: A = None
        self.u: D = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: D = None
        self.q: A = None
        self.o: A = None
        self.u: D = None
        self.t: A = None
        self.txt = txt

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

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

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