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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

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

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

b = A("b")
e = B("e")
k = C("k")
n = D("n")
j = E("j")
a = C("a")

b.x = j
b.q = j
e.v = j
e.r = n
e.o = n
e.t = k
e.z = b
k.u = n
k.v = a
k.z = a
n.u = a
n.w = j
n.o = j
j.v = n
a.u = n
a.v = k
a.z = k
assert k.u.u.v.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

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

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

b = A("b")
e = B("e")
k = C("k")
n = D("n")
j = E("j")
a = C("a")

b.x = j
b.q = j
e.v = j
e.r = n
e.o = n
e.t = k
e.z = b
k.u = n
k.v = a
k.z = a
n.u = a
n.w = j
n.o = j
j.v = n
a.u = n
a.v = k
a.z = k
assert k.u.u.v.u.o.txt == "j"