class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.x: C = None
        self.txt = txt

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

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

i.y = m
j.s = d
j.w = k
j.x = e
j.v = a
j.q = i
e.q = a
e.x = a
e.y = d
e.v = m
e.w = m
m.t = a
m.p = a
m.x = e
d.o = m
d.u = j
b.y = m
l.s = d
l.v = d
l.w = k
l.x = e
l.q = b
f.s = a
f.v = a
f.w = j
f.x = e
f.q = i
k.s = d
k.w = j
k.x = e
k.v = a
k.q = i
a.o = m
a.u = f
assert e.x.u.x.txt == "e"