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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: G = None
        self.x: J = None
        self.o: C = None
        self.z: J = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: F = None
        self.o: A = None
        self.t: A = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.o: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: G = None
        self.x: J = None
        self.o: C = None
        self.z: J = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: F = None
        self.o: A = None
        self.t: A = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.o: H = None
        self.txt = txt

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

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

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