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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: D = None
        self.y: C = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: D = None
        self.y: C = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

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

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