class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: E = None
        self.s: F = None
        self.z: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: D = None
        self.x: B = None
        self.t: F = None
        self.r: C = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: G = None
        self.r: C = None
        self.t: G = None
        self.v: C = None
        self.q: C = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: E = None
        self.p: E = None
        self.txt = txt

k = A("k")
l = B("l")
c = C("c")
f = D("f")
m = E("m")
b = F("b")
j = G("j")
a = D("a")
e = D("e")
n = C("n")

k.o = l
l.w = b
l.x = m
c.s = k
c.z = n
f.u = b
f.s = b
f.q = m
f.z = e
m.v = k
m.p = f
m.x = l
m.t = b
m.q = b
m.r = c
b.o = j
b.w = j
b.t = j
b.r = c
b.q = c
b.v = n
b.x = e
j.r = a
j.v = m
j.p = m
a.u = b
a.s = b
a.q = m
a.z = e
e.u = b
e.s = b
e.q = m
e.z = a
n.s = k
n.z = c
assert j.r.z.s.v.s.o.w.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: E = None
        self.s: F = None
        self.z: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: D = None
        self.x: B = None
        self.t: F = None
        self.r: C = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: G = None
        self.r: C = None
        self.t: G = None
        self.v: C = None
        self.q: C = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: E = None
        self.p: E = None
        self.txt = txt

k = A("k")
l = B("l")
c = C("c")
f = D("f")
m = E("m")
b = F("b")
j = G("j")
a = D("a")
e = D("e")
n = C("n")

k.o = l
l.w = b
l.x = m
c.s = k
c.z = n
f.u = b
f.s = b
f.q = m
f.z = e
m.v = k
m.p = f
m.x = l
m.t = b
m.q = b
m.r = c
b.o = j
b.w = j
b.t = j
b.r = c
b.q = c
b.v = n
b.x = e
j.r = a
j.v = m
j.p = m
a.u = b
a.s = b
a.q = m
a.z = e
e.u = b
e.s = b
e.q = m
e.z = a
n.s = k
n.z = c
assert j.r.z.s.v.s.o.w.x.z.txt == "a"