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

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

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

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

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

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

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

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

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

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

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

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

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

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

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