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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: F = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: J = None
        self.z: C = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: C = None
        self.q: J = None
        self.z: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: I = None
        self.s: A = None
        self.t: E = None
        self.z: D = None
        self.x: G = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: F = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: J = None
        self.z: C = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: C = None
        self.q: J = None
        self.z: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: I = None
        self.s: A = None
        self.t: E = None
        self.z: D = None
        self.x: G = None
        self.q: A = None
        self.txt = txt

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

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