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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: D = None
        self.v: C = None
        self.t: A = None
        self.q: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.u: D = None
        self.y: C = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: H = None
        self.o: C = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.u: A = None
        self.w: G = None
        self.o: G = None
        self.v: A = None
        self.s: E = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: D = None
        self.v: C = None
        self.t: A = None
        self.q: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.u: D = None
        self.y: C = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: H = None
        self.o: C = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.u: A = None
        self.w: G = None
        self.o: G = None
        self.v: A = None
        self.s: E = None
        self.q: G = None
        self.txt = txt

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

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