<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
body{
font-size: 24px;
line-height: 24px;
text-align: center;
padding: 0;
margin: 0;
}
span{
width: 12px;
display: inline-block;
}
</style>
</head>
<body>
<script>
function fn(a)
{
var b = a - 1, str = "";
for (var i=0; i<a; i++) {
for (var j=0; j<a; j++) {
str += j + i != b && i != b && j !=b && i != j && j && i ? "<span></span>" : "#" ;
}
str += "<br>"
}
document.write(str)
}
fn(18)
</script>
</body>
</html>