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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.z: H = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

k = A("k")
i = B("i")
g = C("g")
j = D("j")
m = E("m")
b = F("b")
f = G("f")
e = H("e")
c = F("c")

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.z: H = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

k = A("k")
i = B("i")
g = C("g")
j = D("j")
m = E("m")
b = F("b")
f = G("f")
e = H("e")
c = F("c")

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