class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: B = None
        self.z: G = None
        self.s: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: G = None
        self.w: D = None
        self.y: E = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: C = None
        self.t: F = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: G = None
        self.w: D = None
        self.y: E = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: C = None
        self.t: F = None
        self.y: C = None
        self.txt = txt

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

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