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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: C = None
        self.t: B = None
        self.u: A = None
        self.o: A = None
        self.txt = txt

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

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

c = A("c")
e = B("e")
l = C("l")
d = D("d")
m = E("m")
f = C("f")
n = E("n")
k = B("k")
h = D("h")

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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: C = None
        self.t: B = None
        self.u: A = None
        self.o: A = None
        self.txt = txt

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

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

c = A("c")
e = B("e")
l = C("l")
d = D("d")
m = E("m")
f = C("f")
n = E("n")
k = B("k")
h = D("h")

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