class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: D = None
        self.x: D = None
        self.r: D = None
        self.t: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

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

l.s = n
l.u = i
l.x = f
l.r = f
l.t = m
g.t = f
g.x = f
g.z = n
a.z = e
a.p = e
a.w = e
a.s = l
f.x = g
n.v = a
n.y = l
n.s = e
n.u = f
i.x = g
m.v = a
m.y = l
m.s = l
m.u = f
e.s = m
e.t = m
e.u = i
e.x = i
e.r = f
assert n.y.t.s.u.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: D = None
        self.x: D = None
        self.r: D = None
        self.t: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

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

l.s = n
l.u = i
l.x = f
l.r = f
l.t = m
g.t = f
g.x = f
g.z = n
a.z = e
a.p = e
a.w = e
a.s = l
f.x = g
n.v = a
n.y = l
n.s = e
n.u = f
i.x = g
m.v = a
m.y = l
m.s = l
m.u = f
e.s = m
e.t = m
e.u = i
e.x = i
e.r = f
assert n.y.t.s.u.x.z.txt == "n"