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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: C = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.x: G = None
        self.z: F = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: A = None
        self.o: F = None
        self.r: G = None
        self.s: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: C = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.x: G = None
        self.z: F = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: A = None
        self.o: F = None
        self.r: G = None
        self.s: G = None
        self.txt = txt

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

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

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