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

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

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

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

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

e = A("e")
l = B("l")
c = C("c")
b = D("b")
i = E("i")
d = E("d")
k = A("k")
f = A("f")

e.t = c
e.r = c
e.p = f
e.x = k
l.q = b
l.t = i
c.r = b
c.s = d
c.u = l
b.t = f
b.v = d
b.y = i
b.o = k
i.q = c
i.v = l
i.p = b
i.z = d
i.y = e
d.q = c
d.v = l
d.p = b
d.z = i
d.y = k
k.t = c
k.r = c
k.p = f
k.x = f
f.t = c
f.r = c
f.p = e
f.x = k
assert e.t.r.o.x.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.x: A = None
        self.r: C = None
        self.txt = txt

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

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

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

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

e = A("e")
l = B("l")
c = C("c")
b = D("b")
i = E("i")
d = E("d")
k = A("k")
f = A("f")

e.t = c
e.r = c
e.p = f
e.x = k
l.q = b
l.t = i
c.r = b
c.s = d
c.u = l
b.t = f
b.v = d
b.y = i
b.o = k
i.q = c
i.v = l
i.p = b
i.z = d
i.y = e
d.q = c
d.v = l
d.p = b
d.z = i
d.y = k
k.t = c
k.r = c
k.p = f
k.x = f
f.t = c
f.r = c
f.p = e
f.x = k
assert e.t.r.o.x.x.p.txt == "f"