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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: C = None
        self.r: E = None
        self.x: C = None
        self.s: H = None
        self.y: D = None
        self.v: D = None
        self.o: J = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: A = None
        self.r: J = None
        self.q: B = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: H = None
        self.s: J = None
        self.o: H = None
        self.t: C = None
        self.y: I = None
        self.w: H = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: D = None
        self.p: D = None
        self.y: D = None
        self.r: I = None
        self.o: F = None
        self.w: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: I = None
        self.o: I = None
        self.p: I = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: C = None
        self.r: E = None
        self.x: C = None
        self.s: H = None
        self.y: D = None
        self.v: D = None
        self.o: J = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: A = None
        self.r: J = None
        self.q: B = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: H = None
        self.s: J = None
        self.o: H = None
        self.t: C = None
        self.y: I = None
        self.w: H = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: D = None
        self.p: D = None
        self.y: D = None
        self.r: I = None
        self.o: F = None
        self.w: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: I = None
        self.o: I = None
        self.p: I = None
        self.v: F = None
        self.txt = txt

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

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