class A:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: B = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: A = None
        self.x: A = None
        self.txt = txt

j = A("j")
e = B("e")
a = C("a")
i = A("i")
n = A("n")
k = C("k")
l = B("l")
c = B("c")

j.o = n
j.t = e
j.r = l
e.x = j
e.w = l
e.y = i
a.q = k
a.r = n
a.x = n
i.o = j
i.t = l
i.r = l
n.o = i
n.t = e
n.r = l
k.q = a
k.r = j
k.x = j
l.x = j
l.w = c
l.y = n
c.x = j
c.w = l
c.y = i
assert c.w.y.r.y.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: B = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: A = None
        self.x: A = None
        self.txt = txt

j = A("j")
e = B("e")
a = C("a")
i = A("i")
n = A("n")
k = C("k")
l = B("l")
c = B("c")

j.o = n
j.t = e
j.r = l
e.x = j
e.w = l
e.y = i
a.q = k
a.r = n
a.x = n
i.o = j
i.t = l
i.r = l
n.o = i
n.t = e
n.r = l
k.q = a
k.r = j
k.x = j
l.x = j
l.w = c
l.y = n
c.x = j
c.w = l
c.y = i
assert c.w.y.r.y.r.y.txt == "n"