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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: C = None
        self.y: B = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: D = None
        self.r: C = None
        self.y: H = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: B = None
        self.s: C = None
        self.q: G = None
        self.txt = txt

g = A("g")
a = B("a")
j = C("j")
i = D("i")
l = E("l")
n = F("n")
m = G("m")
f = H("f")
b = A("b")
k = C("k")

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: C = None
        self.y: B = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: D = None
        self.r: C = None
        self.y: H = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: B = None
        self.s: C = None
        self.q: G = None
        self.txt = txt

g = A("g")
a = B("a")
j = C("j")
i = D("i")
l = E("l")
n = F("n")
m = G("m")
f = H("f")
b = A("b")
k = C("k")

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