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

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

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

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

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

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

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

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

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

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

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

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

a.y = e
a.o = j
a.x = j
a.t = n
a.z = k
j.v = a
j.p = e
n.y = a
e.z = n
e.o = j
e.s = j
k.x = l
k.s = l
k.w = l
k.t = j
k.p = e
l.x = k
l.s = k
l.w = k
l.t = j
l.p = e
assert n.y.t.y.txt == "a"