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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: D = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: D = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

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

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

c.t = k
c.r = e
c.s = f
c.p = i
e.w = k
e.u = k
e.s = h
e.z = f
k.s = d
k.z = d
k.u = d
k.x = c
a.p = c
a.t = k
h.y = c
h.p = a
n.w = k
n.u = k
n.s = i
n.z = f
f.w = k
f.u = k
f.s = h
f.z = e
d.p = c
d.t = k
i.y = c
i.p = a
assert i.p.p.t.u.p.r.txt == "e"