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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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