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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

f.z = n
f.p = a
f.x = a
f.y = k
f.o = g
g.s = b
g.q = b
g.u = h
g.y = l
g.z = a
a.v = l
i.y = g
i.x = a
i.r = k
i.w = h
i.t = l
l.o = k
h.z = n
h.p = a
h.x = a
h.y = k
h.o = g
n.z = f
n.p = a
n.x = a
n.y = i
n.o = g
k.y = g
k.x = a
k.r = i
k.w = b
k.t = l
b.z = n
b.p = a
b.x = a
b.y = k
b.o = g
assert k.t.o.w.o.z.v.o.w.x.txt == "a"