class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: H = None
        self.w: D = None
        self.v: I = None
        self.u: J = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: E = None
        self.w: F = None
        self.s: C = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: E = None
        self.z: F = None
        self.v: J = None
        self.u: B = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: E = None
        self.o: I = None
        self.z: B = None
        self.u: F = None
        self.s: H = None
        self.y: I = None
        self.q: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: D = None
        self.v: G = None
        self.q: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: A = None
        self.p: D = None
        self.w: E = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: E = None
        self.w: F = None
        self.s: C = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: E = None
        self.z: F = None
        self.v: J = None
        self.u: B = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: E = None
        self.o: I = None
        self.z: B = None
        self.u: F = None
        self.s: H = None
        self.y: I = None
        self.q: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: D = None
        self.v: G = None
        self.q: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: A = None
        self.p: D = None
        self.w: E = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

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

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

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