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

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

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

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

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

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

b.p = i
b.y = i
b.r = f
b.t = a
i.v = j
i.w = j
i.o = l
i.x = l
j.x = i
j.v = a
c.o = i
c.q = b
c.t = f
c.p = l
f.p = l
f.t = i
f.r = c
a.o = i
a.q = b
a.t = l
a.p = f
l.p = f
l.t = i
l.r = a
assert l.t.w.v.o.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: B = None
        self.r: E = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

b.p = i
b.y = i
b.r = f
b.t = a
i.v = j
i.w = j
i.o = l
i.x = l
j.x = i
j.v = a
c.o = i
c.q = b
c.t = f
c.p = l
f.p = l
f.t = i
f.r = c
a.o = i
a.q = b
a.t = l
a.p = f
l.p = f
l.t = i
l.r = a
assert l.t.w.v.o.x.t.txt == "i"