class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: D = None
        self.y: C = None
        self.w: D = None
        self.r: C = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: A = None
        self.u: A = None
        self.q: H = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: H = None
        self.q: I = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: H = None
        self.t: B = None
        self.r: F = None
        self.u: H = None
        self.o: C = None
        self.x: G = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: G = None
        self.q: C = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: F = None
        self.q: B = None
        self.x: E = None
        self.w: B = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: G = None
        self.w: F = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: A = None
        self.u: A = None
        self.q: H = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: H = None
        self.q: I = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: H = None
        self.t: B = None
        self.r: F = None
        self.u: H = None
        self.o: C = None
        self.x: G = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: G = None
        self.q: C = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: F = None
        self.q: B = None
        self.x: E = None
        self.w: B = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: G = None
        self.w: F = None
        self.z: E = None
        self.txt = txt

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

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