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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: F = None
        self.z: B = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: E = None
        self.x: A = None
        self.p: G = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: F = None
        self.z: B = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: E = None
        self.x: A = None
        self.p: G = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

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

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