class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: F = None
        self.y: B = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: H = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: G = None
        self.y: F = None
        self.v: G = None
        self.z: C = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: H = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: G = None
        self.y: F = None
        self.v: G = None
        self.z: C = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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