class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: G = None
        self.o: G = None
        self.r: C = None
        self.q: B = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: B = None
        self.x: J = None
        self.o: F = None
        self.u: E = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: F = None
        self.p: D = None
        self.s: F = None
        self.v: J = None
        self.q: E = None
        self.txt = txt

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

m = A("m")
n = B("n")
k = C("k")
a = D("a")
l = E("l")
i = F("i")
b = G("b")
d = H("d")
e = I("e")
f = J("f")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: G = None
        self.o: G = None
        self.r: C = None
        self.q: B = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: B = None
        self.x: J = None
        self.o: F = None
        self.u: E = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: F = None
        self.p: D = None
        self.s: F = None
        self.v: J = None
        self.q: E = None
        self.txt = txt

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

m = A("m")
n = B("n")
k = C("k")
a = D("a")
l = E("l")
i = F("i")
b = G("b")
d = H("d")
e = I("e")
f = J("f")

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