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

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: I = None
        self.z: I = None
        self.u: J = None
        self.w: G = None
        self.s: G = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: G = None
        self.o: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: I = None
        self.z: I = None
        self.u: J = None
        self.w: G = None
        self.s: G = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: G = None
        self.o: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.txt = txt

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

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