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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: C = None
        self.y: A = None
        self.o: F = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: F = None
        self.o: J = None
        self.v: C = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: H = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: C = None
        self.y: A = None
        self.o: F = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: F = None
        self.o: J = None
        self.v: C = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: H = None
        self.o: E = None
        self.txt = txt

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

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