class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.x: F = None
        self.u: J = None
        self.v: C = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.r: E = None
        self.txt = txt

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

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

h.w = j
h.x = i
h.t = b
h.o = n
n.p = j
n.u = j
n.x = b
n.v = f
n.w = l
n.z = h
f.r = e
f.p = j
f.x = l
d.v = i
d.u = i
d.p = b
d.q = h
e.o = h
b.x = h
b.p = m
l.u = b
l.p = j
l.v = j
l.q = i
l.t = i
l.w = m
l.s = n
l.y = f
l.o = h
l.x = e
i.z = n
i.o = n
i.t = f
i.r = f
i.y = f
i.v = b
i.u = b
i.x = d
i.s = m
m.s = f
m.o = l
m.r = e
j.r = e
j.x = h
j.s = h
j.u = d
j.y = b
j.q = n
j.p = n
assert l.o.t.x.x.r.r.o.o.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.x: F = None
        self.u: J = None
        self.v: C = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.r: E = None
        self.txt = txt

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

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

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