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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: C = None
        self.p: G = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: C = None
        self.x: E = None
        self.t: E = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: D = None
        self.u: G = None
        self.s: D = None
        self.p: B = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: C = None
        self.p: G = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: C = None
        self.x: E = None
        self.t: E = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: D = None
        self.u: G = None
        self.s: D = None
        self.p: B = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

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

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

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