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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: E = None
        self.u: E = None
        self.p: C = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: D = None
        self.v: A = None
        self.y: E = None
        self.r: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: E = None
        self.u: E = None
        self.p: C = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: D = None
        self.v: A = None
        self.y: E = None
        self.r: F = None
        self.o: C = None
        self.txt = txt

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

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