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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.txt = txt

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

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

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