Gravar-mail: What network motifs tell us about resilience and reliability of complex networks