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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

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

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