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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: F = None
        self.v: E = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: B = None
        self.s: D = None
        self.y: B = None
        self.q: A = None
        self.v: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: F = None
        self.r: A = None
        self.p: D = None
        self.v: D = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: F = None
        self.v: E = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: B = None
        self.s: D = None
        self.y: B = None
        self.q: A = None
        self.v: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: F = None
        self.r: A = None
        self.p: D = None
        self.v: D = None
        self.u: F = None
        self.txt = txt

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

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