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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: B = None
        self.o: B = None
        self.s: C = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: B = None
        self.o: B = None
        self.s: C = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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