class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: B = None
        self.u: E = None
        self.w: C = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

i.z = b
i.w = k
i.x = k
i.q = m
k.r = b
k.t = b
k.q = b
k.v = b
k.x = i
k.s = a
k.y = f
k.u = d
d.v = a
d.s = a
d.z = i
d.o = f
d.t = l
f.t = a
f.r = k
f.s = k
f.u = m
f.w = d
m.q = d
m.v = d
m.u = b
m.r = a
m.w = l
m.z = k
m.y = i
l.z = i
b.t = m
a.z = f
a.t = f
a.r = f
a.s = m
assert k.y.r.r.t.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: B = None
        self.u: E = None
        self.w: C = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

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