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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.o: A = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.o: A = None
        self.t: B = None
        self.txt = txt

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

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