class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: G = None
        self.w: E = None
        self.v: H = None
        self.o: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.y: F = None
        self.o: C = None
        self.v: G = None
        self.t: F = None
        self.x: C = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: A = None
        self.t: A = None
        self.r: A = None
        self.s: D = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: D = None
        self.t: A = None
        self.y: D = None
        self.w: E = None
        self.txt = txt

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

a.s = e
a.z = e
a.w = b
a.o = b
a.v = f
i.s = e
i.w = n
i.y = k
j.t = b
j.p = n
k.t = f
k.x = a
k.o = a
k.z = a
k.v = a
k.r = j
k.u = j
b.p = f
b.z = j
b.o = j
b.x = j
b.y = n
b.t = n
b.v = e
b.u = e
n.t = j
n.o = j
n.s = j
n.y = e
e.x = n
e.o = a
e.t = a
e.r = a
e.s = k
e.y = f
f.s = b
f.w = b
f.p = k
f.y = k
f.t = a
assert k.r.t.u.r.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: G = None
        self.w: E = None
        self.v: H = None
        self.o: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.y: F = None
        self.o: C = None
        self.v: G = None
        self.t: F = None
        self.x: C = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: A = None
        self.t: A = None
        self.r: A = None
        self.s: D = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: D = None
        self.t: A = None
        self.y: D = None
        self.w: E = None
        self.txt = txt

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

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