class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: I = None
        self.y: D = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: G = None
        self.s: J = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.p: D = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: C = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.o: F = None
        self.p: H = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: B = None
        self.p: D = None
        self.r: E = None
        self.u: C = None
        self.w: E = None
        self.q: F = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: G = None
        self.s: J = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: A = None
        self.p: D = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: C = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: H = None
        self.o: F = None
        self.p: H = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: B = None
        self.p: D = None
        self.r: E = None
        self.u: C = None
        self.w: E = None
        self.q: F = None
        self.x: D = None
        self.txt = txt

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

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