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

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

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

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

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

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

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

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

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

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

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

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

a.v = e
a.u = f
a.x = f
e.s = j
m.q = b
m.r = i
b.z = i
b.y = e
f.w = e
f.q = i
f.x = i
f.o = k
n.z = f
n.y = e
k.z = f
k.y = e
j.v = e
j.u = i
j.x = i
l.z = i
l.y = e
i.w = e
i.q = f
i.x = f
i.o = n
assert f.w.s.u.txt == "i"