class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: F = None
        self.t: H = None
        self.w: J = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: F = None
        self.z: H = None
        self.w: I = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: E = None
        self.s: G = None
        self.o: I = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: G = None
        self.r: H = None
        self.v: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: F = None
        self.z: H = None
        self.w: I = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: E = None
        self.s: G = None
        self.o: I = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: G = None
        self.r: H = None
        self.v: C = None
        self.txt = txt

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

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

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