class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: F = None
        self.r: H = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: D = None
        self.r: C = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: F = None
        self.z: C = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: D = None
        self.r: C = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: F = None
        self.z: C = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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