class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: C = None
        self.p: B = None
        self.u: H = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: F = None
        self.u: D = None
        self.p: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: C = None
        self.p: B = None
        self.u: H = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: F = None
        self.u: D = None
        self.p: D = None
        self.z: D = None
        self.txt = txt

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

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