#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#define MAX 50
typedef enum {
ATOM,LIST}ElemTag;
typedef char AtomType;
typedef struct lnode{
ElemTag flag;
union{
AtomType atom;
struct lnode * hp;
}val;
struct lnode * tp;
}*Gl, Lnode;
void InitGlnode(Gl *gl, char *ch);
bool sever(char *head, char *tail);
int Gllen(Gl gl);
int Depth(Gl gl);
void show(Gl gl);
void pshow(Gl gl);
int main(void)
{
Gl gl = NULL;
char ch1[MAX] = "((a,b),(c,d))";
char ch2[MAX] = "((a),(b),((c)),((1,2,(r,(g,h,e),h))),(h))";
char ch3[MAX] = "((),(),())";
char ch4[MAX] = "(a,((b,c),d))";
char ch5[MAX] = "((),(e),(a,(b,c,d)))";
InitGlnode(&gl, ch2);
show(gl);
printf("\n");
printf(