class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: E = None
        self.t: C = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: A = None
        self.y: A = None
        self.s: A = None
        self.p: A = None
        self.w: H = None
        self.z: B = None
        self.q: I = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: C = None
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: A = None
        self.o: B = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.x: F = None
        self.t: F = None
        self.p: H = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: D = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: A = None
        self.y: A = None
        self.s: A = None
        self.p: A = None
        self.w: H = None
        self.z: B = None
        self.q: I = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: C = None
        self.w: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: A = None
        self.o: B = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.x: F = None
        self.t: F = None
        self.p: H = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: D = None
        self.u: B = None
        self.txt = txt

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

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