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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: B = None
        self.t: F = None
        self.x: C = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.t: A = None
        self.o: B = None
        self.w: G = None
        self.r: B = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: B = None
        self.t: F = None
        self.x: C = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.t: A = None
        self.o: B = None
        self.w: G = None
        self.r: B = None
        self.s: G = None
        self.txt = txt

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

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

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

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