class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: E = None
        self.q: E = None
        self.x: D = None
        self.o: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: E = None
        self.u: B = None
        self.s: C = None
        self.x: C = None
        self.txt = txt

a = A("a")
c = B("c")
f = C("f")
n = D("n")
k = E("k")
i = E("i")
j = B("j")
m = D("m")
l = A("l")
d = E("d")

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: E = None
        self.u: B = None
        self.s: C = None
        self.x: C = None
        self.txt = txt

a = A("a")
c = B("c")
f = C("f")
n = D("n")
k = E("k")
i = E("i")
j = B("j")
m = D("m")
l = A("l")
d = E("d")

a.t = l
a.o = l
a.w = k
a.q = k
a.x = m
c.u = i
c.w = f
c.x = a
f.r = i
f.q = l
f.v = j
n.q = d
n.v = j
n.x = a
k.p = f
k.s = f
k.x = f
k.w = i
k.u = j
i.p = f
i.s = f
i.x = f
i.w = d
i.u = j
j.u = k
j.w = f
j.x = l
m.q = d
m.v = j
m.x = a
l.t = a
l.o = a
l.w = k
l.q = k
l.x = n
d.p = f
d.s = f
d.x = f
d.w = i
d.u = c
assert a.w.u.u.w.u.w.txt == "f"