class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: F = None
        self.x: H = None
        self.o: B = None
        self.u: H = None
        self.t: F = None
        self.y: B = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: B = None
        self.t: I = None
        self.r: A = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: A = None
        self.x: C = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: D = None
        self.q: D = None
        self.r: B = None
        self.t: G = None
        self.y: F = None
        self.w: C = None
        self.u: H = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: B = None
        self.t: I = None
        self.r: A = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: A = None
        self.x: C = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: D = None
        self.q: D = None
        self.r: B = None
        self.t: G = None
        self.y: F = None
        self.w: C = None
        self.u: H = None
        self.x: F = None
        self.txt = txt

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

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