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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: D = None
        self.y: E = None
        self.w: E = None
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: D = None
        self.y: E = None
        self.w: E = None
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

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