class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.x: A = None
        self.u: B = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: B = None
        self.w: G = None
        self.s: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.x: A = None
        self.u: B = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: B = None
        self.w: G = None
        self.s: H = None
        self.txt = txt

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

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