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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: F = None
        self.t: B = None
        self.x: F = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.q: B = None
        self.v: G = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: F = None
        self.t: B = None
        self.x: F = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.q: B = None
        self.v: G = None
        self.t: H = None
        self.txt = txt

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

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