class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: J = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.y: H = None
        self.r: E = None
        self.s: H = None
        self.q: J = None
        self.v: F = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: I = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: E = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: D = None
        self.o: C = None
        self.z: I = None
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.y: H = None
        self.r: E = None
        self.s: H = None
        self.q: J = None
        self.v: F = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: I = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: E = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: D = None
        self.o: C = None
        self.z: I = None
        self.x: C = None
        self.txt = txt

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

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