class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: I = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: F = None
        self.y: H = None
        self.x: B = None
        self.p: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: I = None
        self.z: I = None
        self.u: E = None
        self.y: H = None
        self.x: D = None
        self.w: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: F = None
        self.y: H = None
        self.x: B = None
        self.p: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: I = None
        self.z: I = None
        self.u: E = None
        self.y: H = None
        self.x: D = None
        self.w: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: I = None
        self.txt = txt

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

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