class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: J = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: I = None
        self.p: C = None
        self.t: E = None
        self.z: F = None
        self.q: F = None
        self.x: C = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: D = None
        self.y: H = None
        self.o: J = None
        self.u: E = None
        self.z: E = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.txt = txt

k = A("k")
i = B("i")
g = C("g")
h = D("h")
n = E("n")
l = F("l")
j = G("j")
m = H("m")
e = I("e")
b = J("b")

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: I = None
        self.p: C = None
        self.t: E = None
        self.z: F = None
        self.q: F = None
        self.x: C = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: D = None
        self.y: H = None
        self.o: J = None
        self.u: E = None
        self.z: E = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.txt = txt

k = A("k")
i = B("i")
g = C("g")
h = D("h")
n = E("n")
l = F("l")
j = G("j")
m = H("m")
e = I("e")
b = J("b")

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