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

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

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

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

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

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

l.o = i
l.r = i
l.v = a
l.w = a
l.t = j
k.q = d
k.t = m
a.z = l
a.q = g
a.x = k
g.q = i
g.p = i
g.t = l
g.v = a
i.s = k
d.q = i
d.p = i
d.t = l
d.v = a
m.q = g
m.t = j
j.q = g
j.t = m
assert d.v.z.r.s.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: C = None
        self.r: E = None
        self.w: C = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

l.o = i
l.r = i
l.v = a
l.w = a
l.t = j
k.q = d
k.t = m
a.z = l
a.q = g
a.x = k
g.q = i
g.p = i
g.t = l
g.v = a
i.s = k
d.q = i
d.p = i
d.t = l
d.v = a
m.q = g
m.t = j
j.q = g
j.t = m
assert d.v.z.r.s.q.t.txt == "l"