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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: G = None
        self.x: C = None
        self.r: F = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: F = None
        self.y: E = None
        self.z: E = None
        self.q: B = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: C = None
        self.p: C = None
        self.w: C = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: G = None
        self.x: C = None
        self.r: F = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: F = None
        self.y: E = None
        self.z: E = None
        self.q: B = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: C = None
        self.p: C = None
        self.w: C = None
        self.y: B = None
        self.txt = txt

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

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

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

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