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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: H = None
        self.v: F = None
        self.s: B = None
        self.w: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: H = None
        self.v: F = None
        self.s: B = None
        self.w: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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