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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: E = None
        self.x: D = None
        self.u: H = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: B = None
        self.s: B = None
        self.u: B = None
        self.r: D = None
        self.z: D = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: C = None
        self.r: D = None
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: E = None
        self.x: D = None
        self.u: H = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: B = None
        self.s: B = None
        self.u: B = None
        self.r: D = None
        self.z: D = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: C = None
        self.r: D = None
        self.q: A = None
        self.txt = txt

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

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