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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.p: D = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

k = A("k")
l = B("l")
m = C("m")
a = D("a")
i = E("i")
c = F("c")
n = G("n")
g = D("g")
e = F("e")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.p: D = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

k = A("k")
l = B("l")
m = C("m")
a = D("a")
i = E("i")
c = F("c")
n = G("n")
g = D("g")
e = F("e")

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