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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

g = A("g")
k = B("k")
a = C("a")
l = D("l")
e = E("e")
b = C("b")
n = E("n")
j = B("j")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

g = A("g")
k = B("k")
a = C("a")
l = D("l")
e = E("e")
b = C("b")
n = E("n")
j = B("j")

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