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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.w: F = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: B = None
        self.t: B = None
        self.y: E = None
        self.s: B = None
        self.z: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: F = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.w: F = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: B = None
        self.t: B = None
        self.y: E = None
        self.s: B = None
        self.z: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: F = None
        self.t: C = None
        self.txt = txt

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

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