class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: F = None
        self.v: C = None
        self.w: F = None
        self.s: D = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: G = None
        self.s: D = None
        self.x: H = None
        self.z: F = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: J = None
        self.s: B = None
        self.t: D = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: F = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: I = None
        self.z: G = None
        self.v: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.q: E = None
        self.y: H = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: G = None
        self.s: D = None
        self.x: H = None
        self.z: F = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: J = None
        self.s: B = None
        self.t: D = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: F = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: I = None
        self.z: G = None
        self.v: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.q: E = None
        self.y: H = None
        self.w: A = None
        self.txt = txt

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

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