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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: B = None
        self.r: G = None
        self.o: D = None
        self.v: E = None
        self.x: G = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: B = None
        self.w: A = None
        self.x: A = None
        self.v: A = None
        self.z: D = None
        self.txt = txt

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

e = A("e")
f = B("f")
h = C("h")
c = D("c")
l = E("l")
d = F("d")
n = G("n")

e.z = l
f.p = h
f.u = e
f.s = c
f.r = c
f.z = n
f.o = n
f.t = d
h.z = l
h.v = l
h.t = f
h.q = f
h.r = n
h.x = n
h.o = c
c.y = l
c.v = f
l.x = h
d.r = c
d.z = c
d.t = f
d.w = e
d.x = e
d.v = e
n.x = h
n.s = h
n.w = d
n.v = c
n.y = f
n.p = f
n.u = l
assert n.v.y.x.o.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: B = None
        self.r: G = None
        self.o: D = None
        self.v: E = None
        self.x: G = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: B = None
        self.w: A = None
        self.x: A = None
        self.v: A = None
        self.z: D = None
        self.txt = txt

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

e = A("e")
f = B("f")
h = C("h")
c = D("c")
l = E("l")
d = F("d")
n = G("n")

e.z = l
f.p = h
f.u = e
f.s = c
f.r = c
f.z = n
f.o = n
f.t = d
h.z = l
h.v = l
h.t = f
h.q = f
h.r = n
h.x = n
h.o = c
c.y = l
c.v = f
l.x = h
d.r = c
d.z = c
d.t = f
d.w = e
d.x = e
d.v = e
n.x = h
n.s = h
n.w = d
n.v = c
n.y = f
n.p = f
n.u = l
assert n.v.y.x.o.v.s.txt == "c"