30. Arrange the natural numbers 1 to 7 in a row, such that each number is either greater than all the numbers before it or less than all the numbers before it (for example: 4356271 satisfies the condition, starting from the second position, 3 is less than the first 4; 5 is greater than the first two 4, 3; 6 is greater than the first three 4, 3, 5; 2 is less than the first four 4, 3, 5, 6; 7 is greater than the first five 4, 3, 5, 6, 2; 1 is less than the first six 4, 3, 5, 6, 2, 7). Then, among the arrangements that satisfy the condition, the number of arrangements where 7 is not in the fourth position is  kinds.
【Analysis】First consider the 7th number, if this number is less than all the previous numbers, then this number is 1, if this number is greater than all the previous numbers, then this number is 7, there are 2 choices.
Next, consider the 6th number, if this number is less than all the previous numbers, then this number should be the smallest number at this time, if this number is greater than all the previous numbers, then this should be the largest number at this time, there are 2 choices, and so on, the 5th, 4th, 3rd, and 2nd numbers each have 2 choices.
The 1st number has only 1 choice.
Therefore, there are a total of $2^{6}=64$ arrangements.
Consider the case where 7 is in the 4th position.
Since 7 is in the 4th position,
the 7th number can only be less than all the previous numbers, so the 7th number is 1.
Similarly, the 6th number can only be less than all the previous numbers, so the 6th number is 2; the 5th number can only be less than all the previous numbers, so the 5th number is 3.
Next, the 3rd and 2nd numbers can be freely chosen, each with 2 choices.
Therefore, there are $2^{2}=4$ arrangements where 7 is in the 4th position.
Therefore, there are 60 arrangements where 7 is not in the 4th position.