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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: G = None
        self.r: H = None
        self.p: F = None
        self.x: B = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: I = None
        self.r: A = None
        self.o: G = None
        self.t: H = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: J = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: E = None
        self.q: H = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: G = None
        self.r: H = None
        self.p: F = None
        self.x: B = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: I = None
        self.r: A = None
        self.o: G = None
        self.t: H = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: J = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: E = None
        self.q: H = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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