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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: G = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: E = None
        self.w: F = None
        self.v: F = None
        self.r: G = None
        self.z: G = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: E = None
        self.w: D = None
        self.txt = txt

a = A("a")
l = B("l")
j = C("j")
h = D("h")
f = E("f")
i = F("i")
m = G("m")
b = E("b")
d = G("d")
c = E("c")

a.y = m
l.z = i
j.u = i
j.z = m
j.o = m
h.x = f
h.u = i
h.t = i
h.p = b
h.s = d
h.v = l
f.u = l
f.p = c
f.w = i
f.v = i
f.r = m
f.z = d
f.s = h
i.x = l
i.v = a
m.t = f
m.y = b
m.w = h
b.u = l
b.p = c
b.w = i
b.v = i
b.r = m
b.z = m
b.s = h
d.t = f
d.y = b
d.w = h
c.u = l
c.p = f
c.w = i
c.v = i
c.r = m
c.z = d
c.s = h
assert f.s.v.z.x.z.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: G = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: E = None
        self.w: F = None
        self.v: F = None
        self.r: G = None
        self.z: G = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: E = None
        self.w: D = None
        self.txt = txt

a = A("a")
l = B("l")
j = C("j")
h = D("h")
f = E("f")
i = F("i")
m = G("m")
b = E("b")
d = G("d")
c = E("c")

a.y = m
l.z = i
j.u = i
j.z = m
j.o = m
h.x = f
h.u = i
h.t = i
h.p = b
h.s = d
h.v = l
f.u = l
f.p = c
f.w = i
f.v = i
f.r = m
f.z = d
f.s = h
i.x = l
i.v = a
m.t = f
m.y = b
m.w = h
b.u = l
b.p = c
b.w = i
b.v = i
b.r = m
b.z = m
b.s = h
d.t = f
d.y = b
d.w = h
c.u = l
c.p = f
c.w = i
c.v = i
c.r = m
c.z = d
c.s = h
assert f.s.v.z.x.z.v.y.txt == "m"