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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: E = None
        self.w: E = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.p: H = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: I = None
        self.z: E = None
        self.r: H = None
        self.x: F = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: C = None
        self.u: I = None
        self.p: B = None
        self.t: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: E = None
        self.w: E = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.p: H = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: I = None
        self.z: E = None
        self.r: H = None
        self.x: F = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: C = None
        self.u: I = None
        self.p: B = None
        self.t: H = None
        self.txt = txt

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

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