class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: F = None
        self.x: F = None
        self.s: I = None
        self.z: F = None
        self.o: C = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: D = None
        self.y: C = None
        self.o: A = None
        self.u: A = None
        self.x: J = None
        self.v: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: J = None
        self.r: J = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: J = None
        self.u: A = None
        self.x: A = None
        self.s: J = None
        self.q: D = None
        self.o: J = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: D = None
        self.y: C = None
        self.o: A = None
        self.u: A = None
        self.x: J = None
        self.v: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: J = None
        self.r: J = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: J = None
        self.u: A = None
        self.x: A = None
        self.s: J = None
        self.q: D = None
        self.o: J = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: D = None
        self.txt = txt

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

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

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