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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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