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

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

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

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

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

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

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

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

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

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

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

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

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