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

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

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

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

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

j = A("j")
a = B("a")
e = C("e")
l = D("l")
g = E("g")

j.o = a
j.s = g
j.z = g
a.t = g
a.s = l
a.x = j
a.y = j
e.v = l
e.x = l
e.w = l
e.z = g
e.q = j
l.y = j
l.p = e
l.u = g
g.s = e
g.p = j
g.q = a
assert l.p.q.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

j = A("j")
a = B("a")
e = C("e")
l = D("l")
g = E("g")

j.o = a
j.s = g
j.z = g
a.t = g
a.s = l
a.x = j
a.y = j
e.v = l
e.x = l
e.w = l
e.z = g
e.q = j
l.y = j
l.p = e
l.u = g
g.s = e
g.p = j
g.q = a
assert l.p.q.o.t.txt == "g"