class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: F = None
        self.q: F = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

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

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

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

n.w = m
n.o = g
n.q = g
n.r = l
m.r = h
m.q = h
m.t = g
m.y = k
m.o = j
m.z = d
h.t = l
b.v = n
b.o = d
b.q = g
d.o = h
d.t = h
d.s = h
d.v = h
d.w = j
d.y = n
d.x = n
g.v = l
l.w = j
k.r = h
k.q = h
k.t = g
k.y = m
k.o = l
k.z = d
i.v = n
i.o = d
i.q = g
j.w = l
assert g.v.w.w.w.w.w.w.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: F = None
        self.q: F = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

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

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

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

n.w = m
n.o = g
n.q = g
n.r = l
m.r = h
m.q = h
m.t = g
m.y = k
m.o = j
m.z = d
h.t = l
b.v = n
b.o = d
b.q = g
d.o = h
d.t = h
d.s = h
d.v = h
d.w = j
d.y = n
d.x = n
g.v = l
l.w = j
k.r = h
k.q = h
k.t = g
k.y = m
k.o = l
k.z = d
i.v = n
i.o = d
i.q = g
j.w = l
assert g.v.w.w.w.w.w.w.w.w.w.txt == "j"