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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.o: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: G = None
        self.t: B = None
        self.z: G = None
        self.txt = txt

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

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

i.y = e
i.s = k
i.x = a
c.y = d
c.q = m
l.z = c
l.v = c
l.y = e
l.p = m
l.x = j
l.q = a
l.s = d
k.r = a
d.p = i
d.q = i
d.s = j
d.o = l
j.y = k
j.s = e
j.z = e
j.t = c
e.o = c
a.r = k
h.o = c
m.z = c
m.v = c
m.y = h
m.p = l
m.x = j
m.q = a
m.s = d
assert d.s.y.r.r.r.r.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: D = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.o: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: G = None
        self.t: B = None
        self.z: G = None
        self.txt = txt

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

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

i.y = e
i.s = k
i.x = a
c.y = d
c.q = m
l.z = c
l.v = c
l.y = e
l.p = m
l.x = j
l.q = a
l.s = d
k.r = a
d.p = i
d.q = i
d.s = j
d.o = l
j.y = k
j.s = e
j.z = e
j.t = c
e.o = c
a.r = k
h.o = c
m.z = c
m.v = c
m.y = h
m.p = l
m.x = j
m.q = a
m.s = d
assert d.s.y.r.r.r.r.r.r.txt == "k"