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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.q: C = None
        self.u: B = None
        self.p: C = None
        self.txt = txt

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

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

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

g.r = m
g.o = f
g.y = n
g.x = n
j.t = g
j.o = g
j.r = a
j.u = l
j.v = i
a.x = c
a.y = m
a.q = i
a.p = i
a.u = j
c.s = f
f.w = a
f.z = a
f.y = c
f.u = i
l.t = n
l.o = n
l.r = a
l.u = j
l.v = i
n.r = d
n.o = f
n.y = g
n.x = g
i.x = m
i.y = d
i.q = a
i.p = a
i.u = j
d.s = f
m.s = f
assert f.w.x.s.u.p.x.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.y: A = None
        self.x: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.q: C = None
        self.u: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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