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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: C = None
        self.x: H = None
        self.z: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: C = None
        self.x: H = None
        self.z: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

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

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