class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: F = None
        self.z: E = None
        self.u: I = None
        self.y: G = None
        self.q: J = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.q: B = None
        self.x: H = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: J = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: G = None
        self.y: H = None
        self.q: G = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.q: B = None
        self.x: H = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: J = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: G = None
        self.y: H = None
        self.q: G = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: B = None
        self.q: E = None
        self.txt = txt

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

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