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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: F = None
        self.v: C = None
        self.x: C = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: F = None
        self.v: C = None
        self.x: C = None
        self.q: D = None
        self.txt = txt

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

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

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