class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: F = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: H = None
        self.s: B = None
        self.t: A = None
        self.v: C = None
        self.w: G = None
        self.o: J = None
        self.z: A = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: F = None
        self.x: D = None
        self.v: D = None
        self.y: H = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: D = None
        self.u: J = None
        self.p: C = None
        self.w: G = None
        self.t: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: D = None
        self.t: F = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: F = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: H = None
        self.s: B = None
        self.t: A = None
        self.v: C = None
        self.w: G = None
        self.o: J = None
        self.z: A = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: F = None
        self.x: D = None
        self.v: D = None
        self.y: H = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: D = None
        self.u: J = None
        self.p: C = None
        self.w: G = None
        self.t: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: D = None
        self.t: F = None
        self.s: D = None
        self.txt = txt

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

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