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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.p: H = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: E = None
        self.x: A = None
        self.v: G = None
        self.r: A = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: E = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.r: G = None
        self.p: G = None
        self.w: E = None
        self.txt = txt

m = A("m")
i = B("i")
e = C("e")
j = D("j")
g = E("g")
h = F("h")
n = G("n")
k = H("k")
l = A("l")

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.p: H = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: E = None
        self.x: A = None
        self.v: G = None
        self.r: A = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: E = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.r: G = None
        self.p: G = None
        self.w: E = None
        self.txt = txt

m = A("m")
i = B("i")
e = C("e")
j = D("j")
g = E("g")
h = F("h")
n = G("n")
k = H("k")
l = A("l")

m.v = e
m.w = l
m.z = i
i.s = m
i.z = e
i.p = k
i.r = j
e.w = j
j.v = k
g.z = e
g.r = k
h.t = m
h.x = m
h.y = g
h.v = n
h.r = l
h.o = e
n.v = l
n.u = g
n.t = h
k.y = l
k.u = h
k.r = n
k.p = n
k.w = g
l.v = e
l.w = m
l.z = i
assert g.z.w.v.y.z.z.w.txt == "j"