class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: E = None
        self.t: G = None
        self.x: C = None
        self.o: D = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.v: F = None
        self.r: A = None
        self.x: E = None
        self.z: F = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: G = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.v: F = None
        self.r: A = None
        self.x: E = None
        self.z: F = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: G = None
        self.z: G = None
        self.txt = txt

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

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