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

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

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

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

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

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

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

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

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

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

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

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

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