class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: H = None
        self.z: B = None
        self.p: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

k = A("k")
h = B("h")
a = C("a")
l = D("l")
m = E("m")
i = F("i")
g = G("g")
f = H("f")
e = C("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

k = A("k")
h = B("h")
a = C("a")
l = D("l")
m = E("m")
i = F("i")
g = G("g")
f = H("f")
e = C("e")

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