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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: J = None
        self.y: D = None
        self.p: C = None
        self.q: J = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: G = None
        self.x: H = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.v: D = None
        self.w: B = None
        self.x: E = None
        self.p: A = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: F = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.u: C = None
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: J = None
        self.y: D = None
        self.p: C = None
        self.q: J = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: G = None
        self.x: H = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.v: D = None
        self.w: B = None
        self.x: E = None
        self.p: A = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: F = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.u: C = None
        self.p: F = None
        self.txt = txt

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

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