class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: J = None
        self.y: J = None
        self.z: G = None
        self.x: I = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: F = None
        self.q: I = None
        self.x: A = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: J = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: J = None
        self.x: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: F = None
        self.q: I = None
        self.x: A = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: J = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: J = None
        self.x: A = None
        self.txt = txt

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

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

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