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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: B = None
        self.txt = txt

k = A("k")
l = B("l")
h = C("h")
n = D("n")
j = E("j")
i = F("i")
g = G("g")
f = C("f")
e = F("e")

k.q = h
k.o = h
k.z = g
l.s = n
l.u = n
l.z = h
l.t = h
h.z = g
h.t = g
h.v = j
h.p = n
h.x = l
h.s = f
n.z = k
j.v = n
j.o = n
j.x = k
i.z = l
i.t = f
i.x = j
i.q = j
i.r = n
i.p = g
g.t = k
g.y = l
f.z = g
f.t = g
f.v = j
f.p = n
f.x = l
f.s = h
e.z = l
e.t = h
e.x = j
e.q = j
e.r = n
e.p = g
assert f.z.y.z.v.x.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.o: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: B = None
        self.txt = txt

k = A("k")
l = B("l")
h = C("h")
n = D("n")
j = E("j")
i = F("i")
g = G("g")
f = C("f")
e = F("e")

k.q = h
k.o = h
k.z = g
l.s = n
l.u = n
l.z = h
l.t = h
h.z = g
h.t = g
h.v = j
h.p = n
h.x = l
h.s = f
n.z = k
j.v = n
j.o = n
j.x = k
i.z = l
i.t = f
i.x = j
i.q = j
i.r = n
i.p = g
g.t = k
g.y = l
f.z = g
f.t = g
f.v = j
f.p = n
f.x = l
f.s = h
e.z = l
e.t = h
e.x = j
e.q = j
e.r = n
e.p = g
assert f.z.y.z.v.x.z.y.txt == "l"