class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: H = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.s: G = None
        self.z: D = None
        self.w: F = None
        self.o: J = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.s: G = None
        self.z: D = None
        self.w: F = None
        self.o: J = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.z: H = None
        self.txt = txt

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

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