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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.r: J = None
        self.o: H = None
        self.s: F = None
        self.x: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.r: J = None
        self.o: H = None
        self.s: F = None
        self.x: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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