class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: D = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: E = None
        self.q: B = None
        self.w: E = None
        self.p: F = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: D = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: E = None
        self.q: B = None
        self.w: E = None
        self.p: F = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: A = None
        self.txt = txt

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

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

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