class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

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

k.y = h
h.q = n
h.s = n
h.w = i
h.u = d
j.v = h
j.y = k
j.q = k
j.t = b
j.z = a
d.s = h
d.v = b
d.q = a
d.w = f
a.y = k
a.r = k
a.x = f
a.z = n
n.y = k
n.r = k
n.x = f
n.z = a
f.s = h
f.v = j
f.q = a
f.w = d
b.v = h
b.y = k
b.q = k
b.t = j
b.z = a
i.v = h
i.y = k
i.q = k
i.t = j
i.z = n
assert k.y.s.x.v.v.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

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

k.y = h
h.q = n
h.s = n
h.w = i
h.u = d
j.v = h
j.y = k
j.q = k
j.t = b
j.z = a
d.s = h
d.v = b
d.q = a
d.w = f
a.y = k
a.r = k
a.x = f
a.z = n
n.y = k
n.r = k
n.x = f
n.z = a
f.s = h
f.v = j
f.q = a
f.w = d
b.v = h
b.y = k
b.q = k
b.t = j
b.z = a
i.v = h
i.y = k
i.q = k
i.t = j
i.z = n
assert k.y.s.x.v.v.u.q.txt == "a"