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

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: H = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: B = None
        self.v: F = None
        self.u: F = None
        self.q: C = None
        self.x: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: A = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: E = None
        self.w: D = None
        self.y: B = None
        self.x: F = None
        self.t: B = None
        self.p: J = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: F = None
        self.s: E = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: I = None
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: H = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: B = None
        self.v: F = None
        self.u: F = None
        self.q: C = None
        self.x: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: A = None
        self.s: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: E = None
        self.w: D = None
        self.y: B = None
        self.x: F = None
        self.t: B = None
        self.p: J = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: F = None
        self.s: E = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: I = None
        self.x: C = None
        self.txt = txt

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

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