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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.z: F = None
        self.t: A = None
        self.s: E = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.z: F = None
        self.t: A = None
        self.s: E = None
        self.o: A = None
        self.txt = txt

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

g.v = h
g.y = b
g.w = j
m.t = j
m.o = h
n.v = a
n.o = j
n.w = b
b.w = h
b.o = h
b.v = h
b.s = d
b.y = d
b.u = j
h.u = n
h.t = m
j.r = d
j.s = d
j.t = a
j.z = g
a.u = m
a.x = g
a.t = g
a.o = g
a.z = j
a.s = h
d.u = m
d.x = g
d.t = g
d.o = g
d.z = j
d.s = h
assert m.o.u.w.o.t.o.t.txt == "m"