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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: E = None
        self.t: C = None
        self.p: C = None
        self.q: G = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: E = None
        self.t: C = None
        self.p: C = None
        self.q: G = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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