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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: D = None
        self.t: B = None
        self.p: B = None
        self.w: B = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.txt = txt

k = A("k")
d = B("d")
e = C("e")
i = D("i")
j = E("j")
h = F("h")
l = A("l")
n = C("n")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: D = None
        self.t: B = None
        self.p: B = None
        self.w: B = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.txt = txt

k = A("k")
d = B("d")
e = C("e")
i = D("i")
j = E("j")
h = F("h")
l = A("l")
n = C("n")

k.u = j
k.q = l
k.y = l
k.s = d
k.o = d
k.x = h
d.x = h
d.o = k
e.w = h
e.s = d
e.r = l
e.o = j
e.y = j
i.q = h
i.s = k
i.x = d
j.z = n
j.u = i
j.y = i
j.t = d
j.p = d
j.w = d
h.y = e
h.q = n
l.u = j
l.q = k
l.y = k
l.s = d
l.o = d
l.x = h
n.w = h
n.s = d
n.r = k
n.o = j
n.y = j
assert d.x.q.y.z.r.u.txt == "j"