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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: E = None
        self.p: H = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: E = None
        self.p: H = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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