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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: C = None
        self.z: E = None
        self.v: D = None
        self.y: E = None
        self.txt = txt

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

e = A("e")
l = B("l")
k = C("k")
h = D("h")
m = E("m")
j = D("j")

e.v = k
e.p = m
l.y = k
l.v = k
l.x = e
l.u = e
l.q = j
k.z = e
k.t = m
h.p = m
h.z = m
h.y = m
h.s = k
h.v = j
m.s = l
m.o = k
j.p = m
j.z = m
j.y = m
j.s = k
j.v = h
assert l.q.s.z.v.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: C = None
        self.z: E = None
        self.v: D = None
        self.y: E = None
        self.txt = txt

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

e = A("e")
l = B("l")
k = C("k")
h = D("h")
m = E("m")
j = D("j")

e.v = k
e.p = m
l.y = k
l.v = k
l.x = e
l.u = e
l.q = j
k.z = e
k.t = m
h.p = m
h.z = m
h.y = m
h.s = k
h.v = j
m.s = l
m.o = k
j.p = m
j.z = m
j.y = m
j.s = k
j.v = h
assert l.q.s.z.v.t.o.txt == "k"