class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: C = None
        self.x: C = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.q: B = None
        self.z: D = None
        self.s: C = None
        self.txt = txt

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

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

j = A("j")
c = B("c")
h = C("h")
k = D("k")
m = E("m")
a = F("a")
n = G("n")
g = B("g")
d = A("d")
i = C("i")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.q: B = None
        self.z: D = None
        self.s: C = None
        self.txt = txt

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

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

j = A("j")
c = B("c")
h = C("h")
k = D("k")
m = E("m")
a = F("a")
n = G("n")
g = B("g")
d = A("d")
i = C("i")

j.t = n
j.s = h
j.x = h
j.o = c
c.x = d
h.x = i
h.v = k
h.y = k
h.o = n
h.z = n
h.w = j
k.r = m
k.u = n
k.s = g
m.r = d
m.t = a
m.q = g
m.z = k
m.s = h
a.z = c
a.s = k
a.r = k
a.p = i
a.t = n
a.o = m
a.v = j
n.p = a
n.v = h
n.o = m
n.r = m
n.x = k
g.x = d
d.t = n
d.s = i
d.x = h
d.o = c
i.x = h
i.v = k
i.y = k
i.o = n
i.z = n
i.w = d
assert m.s.v.s.x.o.x.s.z.r.z.txt == "k"