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

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

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

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

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

c = A("c")
l = B("l")
i = C("i")
e = D("e")
f = E("f")
j = C("j")

c.y = j
c.o = j
c.v = f
l.s = c
l.x = c
l.o = e
i.t = f
i.p = e
i.x = c
i.o = c
i.y = j
e.p = j
e.x = j
f.v = l
f.t = e
f.z = c
j.t = f
j.p = e
j.x = c
j.o = c
j.y = i
assert f.t.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

c = A("c")
l = B("l")
i = C("i")
e = D("e")
f = E("f")
j = C("j")

c.y = j
c.o = j
c.v = f
l.s = c
l.x = c
l.o = e
i.t = f
i.p = e
i.x = c
i.o = c
i.y = j
e.p = j
e.x = j
f.v = l
f.t = e
f.z = c
j.t = f
j.p = e
j.x = c
j.o = c
j.y = i
assert f.t.x.p.txt == "e"