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

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

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: B = None
        self.v: C = None
        self.t: A = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: B = None
        self.o: B = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.w: D = None
        self.x: D = None
        self.txt = txt

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

i.s = n
i.z = m
f.z = e
n.o = e
n.v = e
n.w = f
n.t = d
n.x = j
l.w = i
l.q = f
l.r = f
l.o = j
l.t = c
m.t = i
m.q = a
m.w = l
m.x = c
e.o = n
e.v = n
e.w = j
e.x = j
e.t = d
a.t = i
a.q = m
a.w = c
a.x = c
c.w = d
c.q = j
c.o = f
c.r = f
c.t = l
d.s = n
d.z = a
j.z = e
assert c.o.z.x.z.t.s.x.z.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: B = None
        self.v: C = None
        self.t: A = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: B = None
        self.o: B = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.w: D = None
        self.x: D = None
        self.txt = txt

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

i.s = n
i.z = m
f.z = e
n.o = e
n.v = e
n.w = f
n.t = d
n.x = j
l.w = i
l.q = f
l.r = f
l.o = j
l.t = c
m.t = i
m.q = a
m.w = l
m.x = c
e.o = n
e.v = n
e.w = j
e.x = j
e.t = d
a.t = i
a.q = m
a.w = c
a.x = c
c.w = d
c.q = j
c.o = f
c.r = f
c.t = l
d.s = n
d.z = a
j.z = e
assert c.o.z.x.z.t.s.x.z.t.s.txt == "n"