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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: E = None
        self.q: H = None
        self.w: G = None
        self.x: E = None
        self.z: A = None
        self.u: G = None
        self.o: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: E = None
        self.q: H = None
        self.w: G = None
        self.x: E = None
        self.z: A = None
        self.u: G = None
        self.o: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.q: A = None
        self.txt = txt

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

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

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