class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: G = None
        self.o: G = None
        self.q: C = None
        self.u: C = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: E = None
        self.s: E = None
        self.o: C = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: E = None
        self.x: B = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.o: G = None
        self.v: G = None
        self.p: G = None
        self.r: G = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: E = None
        self.s: E = None
        self.o: C = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: E = None
        self.x: B = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.o: G = None
        self.v: G = None
        self.p: G = None
        self.r: G = None
        self.s: D = None
        self.txt = txt

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

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