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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: J = None
        self.r: E = None
        self.z: D = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: J = None
        self.w: A = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: C = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: J = None
        self.y: G = None
        self.q: G = None
        self.u: I = None
        self.r: B = None
        self.t: C = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: H = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

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

m = A("m")
j = B("j")
a = C("a")
n = D("n")
k = E("k")
l = F("l")
e = G("e")
d = H("d")
b = I("b")
g = J("g")

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: J = None
        self.r: E = None
        self.z: D = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: J = None
        self.w: A = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: C = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: J = None
        self.y: G = None
        self.q: G = None
        self.u: I = None
        self.r: B = None
        self.t: C = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: H = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

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

m = A("m")
j = B("j")
a = C("a")
n = D("n")
k = E("k")
l = F("l")
e = G("e")
d = H("d")
b = I("b")
g = J("g")

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