class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.r: D = None
        self.t: C = None
        self.u: A = None
        self.v: D = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

i.q = l
i.x = k
i.r = b
i.v = b
i.w = b
i.t = m
i.u = h
c.y = a
c.w = i
c.r = b
c.t = m
d.s = m
d.z = b
b.z = l
l.r = k
l.y = c
k.q = l
k.z = l
k.t = a
k.u = h
k.w = h
k.r = h
f.w = b
f.x = m
f.o = m
f.z = i
f.t = a
a.y = c
a.w = h
a.r = b
a.t = m
h.q = l
h.x = k
h.r = b
h.v = b
h.w = b
h.t = m
h.u = i
m.s = d
m.z = b
assert i.q.r.t.t.s.z.z.r.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.r: D = None
        self.t: C = None
        self.u: A = None
        self.v: D = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

i.q = l
i.x = k
i.r = b
i.v = b
i.w = b
i.t = m
i.u = h
c.y = a
c.w = i
c.r = b
c.t = m
d.s = m
d.z = b
b.z = l
l.r = k
l.y = c
k.q = l
k.z = l
k.t = a
k.u = h
k.w = h
k.r = h
f.w = b
f.x = m
f.o = m
f.z = i
f.t = a
a.y = c
a.w = h
a.r = b
a.t = m
h.q = l
h.x = k
h.r = b
h.v = b
h.w = b
h.t = m
h.u = i
m.s = d
m.z = b
assert i.q.r.t.t.s.z.z.r.r.x.txt == "k"