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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.o: E = None
        self.z: E = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.o: E = None
        self.z: E = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

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

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

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