class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: E = None
        self.w: G = None
        self.o: E = None
        self.y: F = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: D = None
        self.z: A = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

j = A("j")
i = B("i")
f = C("f")
n = D("n")
m = E("m")
h = F("h")
l = G("l")

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: D = None
        self.z: A = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

j = A("j")
i = B("i")
f = C("f")
n = D("n")
m = E("m")
h = F("h")
l = G("l")

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