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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: G = None
        self.r: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: F = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: D = None
        self.q: I = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.p: D = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: H = None
        self.x: A = None
        self.w: I = None
        self.s: E = None
        self.q: F = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: G = None
        self.r: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: F = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: D = None
        self.q: I = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.p: D = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: H = None
        self.x: A = None
        self.w: I = None
        self.s: E = None
        self.q: F = None
        self.u: E = None
        self.txt = txt

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

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