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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: H = None
        self.t: H = None
        self.w: F = None
        self.u: B = None
        self.s: C = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: H = None
        self.r: C = None
        self.o: A = None
        self.p: F = None
        self.z: D = None
        self.w: F = None
        self.x: F = None
        self.txt = txt

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

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

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

f = A("f")
c = B("c")
h = C("h")
m = D("m")
i = E("i")
d = F("d")
k = G("k")
j = H("j")
a = B("a")

f.z = k
f.v = k
f.w = k
f.x = k
f.r = h
f.s = j
f.p = i
f.q = a
c.w = a
h.o = a
h.z = f
h.w = f
h.q = d
h.p = c
h.x = c
h.t = c
h.s = k
m.p = d
m.w = d
m.o = d
m.q = j
m.t = j
m.u = a
m.s = h
i.q = d
i.p = d
i.w = d
i.x = d
i.v = j
i.r = h
i.o = f
i.z = m
d.u = i
d.p = h
d.r = h
d.w = f
k.s = d
k.w = d
k.t = d
k.o = c
j.r = c
j.o = h
a.w = c
assert a.w.w.w.w.w.w.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: C = None
        self.v: G = None
        self.s: H = None
        self.w: G = None
        self.p: E = None
        self.x: G = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: H = None
        self.t: H = None
        self.w: F = None
        self.u: B = None
        self.s: C = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: H = None
        self.r: C = None
        self.o: A = None
        self.p: F = None
        self.z: D = None
        self.w: F = None
        self.x: F = None
        self.txt = txt

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

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

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

f = A("f")
c = B("c")
h = C("h")
m = D("m")
i = E("i")
d = F("d")
k = G("k")
j = H("j")
a = B("a")

f.z = k
f.v = k
f.w = k
f.x = k
f.r = h
f.s = j
f.p = i
f.q = a
c.w = a
h.o = a
h.z = f
h.w = f
h.q = d
h.p = c
h.x = c
h.t = c
h.s = k
m.p = d
m.w = d
m.o = d
m.q = j
m.t = j
m.u = a
m.s = h
i.q = d
i.p = d
i.w = d
i.x = d
i.v = j
i.r = h
i.o = f
i.z = m
d.u = i
d.p = h
d.r = h
d.w = f
k.s = d
k.w = d
k.t = d
k.o = c
j.r = c
j.o = h
a.w = c
assert a.w.w.w.w.w.w.w.w.w.txt == "c"