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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: A = None
        self.y: D = None
        self.x: E = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: A = None
        self.y: D = None
        self.x: E = None
        self.u: D = None
        self.txt = txt

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

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