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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.t: D = None
        self.v: F = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.t: D = None
        self.v: F = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: B = None
        self.txt = txt

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

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