class node:
    def __init__(self,data):
        self.data = data
        self.next = None

class linkedlist:
    def __init__(self):
        self.head = self.tail = None
    
    def __str__(self):
        output =''
        n = self.head
        while n is not self.tail:
            output += ' ' + str(n.data)
            n = n.next
        output+=' ' + str(n.data)
        return output
    def append(self,data):
        if self.head == None:
            self.head = node(data)
            self.tail = self.head
        else:
            tail = self.tail
            tail.next = node(data)
            self.tail = tail.next
x = linkedlist()
x.append('a')
x.append('b')
x.append('c')
print(x)

d3a349b0558ab1667b44dae46ad7a86b7456ed67
<mask token>


class linkedlist:

    def __init__(self):
        self.head = self.tail = None

    def __str__(self):
        output = ''
        n = self.head
        while n is not self.tail:
            output += ' ' + str(n.data)
            n = n.next
        output += ' ' + str(n.data)
        return output
    <mask token>


<mask token>

<mask token>


class linkedlist:

    def __init__(self):
        self.head = self.tail = None

    def __str__(self):
        output = ''
        n = self.head
        while n is not self.tail:
            output += ' ' + str(n.data)
            n = n.next
        output += ' ' + str(n.data)
        return output

    def append(self, data):
        if self.head == None:
            self.head = node(data)
            self.tail = self.head
        else:
            tail = self.tail
            tail.next = node(data)
            self.tail = tail.next


<mask token>

class node:
    <mask token>


class linkedlist:

    def __init__(self):
        self.head = self.tail = None

    def __str__(self):
        output = ''
        n = self.head
        while n is not self.tail:
            output += ' ' + str(n.data)
            n = n.next
        output += ' ' + str(n.data)
        return output

    def append(self, data):
        if self.head == None:
            self.head = node(data)
            self.tail = self.head
        else:
            tail = self.tail
            tail.next = node(data)
            self.tail = tail.next


<mask token>

class node:

    def __init__(self, data):
        self.data = data
        self.next = None


class linkedlist:

    def __init__(self):
        self.head = self.tail = None

    def __str__(self):
        output = ''
        n = self.head
        while n is not self.tail:
            output += ' ' + str(n.data)
            n = n.next
        output += ' ' + str(n.data)
        return output

    def append(self, data):
        if self.head == None:
            self.head = node(data)
            self.tail = self.head
        else:
            tail = self.tail
            tail.next = node(data)
            self.tail = tail.next


<mask token>

class node:
    def __init__(self,data):
        self.data = data
        self.next = None

class linkedlist:
    def __init__(self):
        self.head = self.tail = None
    
    def __str__(self):
        output =''
        n = self.head
        while n is not self.tail:
            output += ' ' + str(n.data)
            n = n.next
        output+=' ' + str(n.data)
        return output
    def append(self,data):
        if self.head == None:
            self.head = node(data)
            self.tail = self.head
        else:
            tail = self.tail
            tail.next = node(data)
            self.tail = tail.next
x = linkedlist()
x.append('a')
x.append('b')
x.append('c')
print(x)
