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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: G = None
        self.s: C = None
        self.u: A = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.u: F = None
        self.r: H = None
        self.p: E = None
        self.t: C = None
        self.z: G = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: E = None
        self.r: C = None
        self.y: G = None
        self.v: G = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: G = None
        self.s: C = None
        self.u: A = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.u: F = None
        self.r: H = None
        self.p: E = None
        self.t: C = None
        self.z: G = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: E = None
        self.r: C = None
        self.y: G = None
        self.v: G = None
        self.w: D = None
        self.txt = txt

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

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