class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: A = None
        self.x: F = None
        self.r: B = None
        self.o: J = None
        self.q: J = None
        self.s: B = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: B = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.q: A = None
        self.w: B = None
        self.t: B = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: F = None
        self.t: F = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: G = None
        self.p: G = None
        self.q: B = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: B = None
        self.t: F = None
        self.u: H = None
        self.z: B = None
        self.r: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: A = None
        self.x: F = None
        self.r: B = None
        self.o: J = None
        self.q: J = None
        self.s: B = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: B = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.q: A = None
        self.w: B = None
        self.t: B = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: F = None
        self.t: F = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: G = None
        self.p: G = None
        self.q: B = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: B = None
        self.t: F = None
        self.u: H = None
        self.z: B = None
        self.r: H = None
        self.txt = txt

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

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